checking for libpq-fe.h... *** extconf.rb failed ***
似乎是问题所在,它来自这条尾巴:
ERROR: Error installing pg:
ERROR: Failed to build gem native extension.
/Users/elephanttrip/.rvm/rubies/ruby-1.9.2-p320/bin/ruby extconf.rb
checking for pg_config... yes
Using config values from /usr/local/bin/pg_config
checking for libpq-fe.h... *** 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.
我在 Mountain Lion Mac OS 上重现此问题的步骤是:
brew install postgresql
env ARCHFLAGS="-arch x86_64" gem install pg
我试图通过我的计算机查明不同的 pg_config。一个在 Brew 的地窖里,一个由 Brew cp'd to /user/local
,另一个可能来自之前的下载。它们都不起作用。
更新
只是尝试在没有配置选项的情况下安装。并得到了一个大声笑:
ruby extconf.rb --without-pg-config
checking for pg_config... yes