2011-01-24 91 views
2
gem install pg 

Building native extensions. This could take a while...
ERROR: Error installing pg:
ERROR: Failed to build gem native extension.我已經做了「釀安裝PostgreSQL」了9.0.2,但運行「寶石安裝PG」我知道缺少庫

/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby extconf.rb
checking for pg_config... yes
Using config values from /usr/local/bin/pg_config
checking for libpq-fe.h... yes
checking for libpq/libpq-fs.h... yes
checking for PQconnectdb() in -lpq... no
checking for PQconnectdb() in -llibpq... no
checking for PQconnectdb() in -lms/libpq... no
Can't find the PostgreSQL client library (libpq)
* extconf.rb failed *

+0

這工作! env ARCHFLAGS =「 - arch x86_64」gem install pg – elkalto23 2011-01-24 01:37:52

回答

4

它看起來像你要麼需要指定你的Postgres lib目錄:

gem install pg -- --with-pg-dir=/path/to/pg_dir 

或者一個32位vs.64位兼容性問題

ARCHFLAGS='-arch x86_64' gem install pg 
+0

感謝Win,像一個魅力一樣工作! :) – 2011-05-24 13:38:21

0

「ENV ARCHFLAGS =」 - 拱x86_64" 的創業板安裝PG」使用雪豹當爲我工作。

相關問題