Ruby on rails 无法使用OS X/Yosemite在我的mac上安装postgres gem
我已经看到这个问题在很多不同的网站上发布了几十次,有很多不同的答案,但似乎都不起作用 我试图在我的Mac(OS X/Yosemite)上安装“pg”gem,但不断出现以下错误:Ruby on rails 无法使用OS X/Yosemite在我的mac上安装postgres gem,ruby-on-rails,ruby,macos,postgresql,Ruby On Rails,Ruby,Macos,Postgresql,我已经看到这个问题在很多不同的网站上发布了几十次,有很多不同的答案,但似乎都不起作用 我试图在我的Mac(OS X/Yosemite)上安装“pg”gem,但不断出现以下错误: Building native extensions. This could take a while... ERROR: Error installing pg: ERROR: Failed to build gem native extension. /System/Library/Framew
Building native extensions. This could take a while...
ERROR: Error installing pg:
ERROR: Failed to build gem native extension.
/System/Library/Frameworks/Ruby.framework/Versions/2.0/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 pg_config_manual.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 ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby
--with-pg
--without-pg
--enable-windows-cross
--disable-windows-cross
--with-pg-config
--without-pg-config
--with-pg_config
--without-pg_config
--with-pg-dir
--without-pg-dir
--with-pg-include
--without-pg-include=${pg-dir}/include
--with-pg-lib
--without-pg-lib=${pg-dir}/
--with-pqlib
--without-pqlib
--with-libpqlib
--without-libpqlib
--with-ms/libpqlib
--without-ms/libpqlib
我已经尝试过用$brew install postgresql
重新安装Postgres,使用sudo gem install pg
,并使用xcode select--install
升级xcode
任何关于这意味着什么的见解都会很有帮助。我的回答有帮助吗?可能重复:。谢谢,伙计们,这两种解决方案都不起作用。我已经在这里读了五个小时了。这个怎么样?可能必须将包含libpq的目录添加到
DYLD\u库\u路径中