相关疑难解决方法(0)

Rails 3 - 无法安装pg gem

当我尝试运行bundle(bundle install)时,我总是得到

Installing pg (0.13.2) with native extensions 
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

        /Users/ryan/.rvm/rubies/ruby-1.9.2-p290/bin/ruby extconf.rb 
checking for pg_config... no
No pg_config... trying anyway. If building fails, please try again with
 --with-pg-config=/path/to/pg_config
checking for libpq-fe.h... no
Can't find the 'libpq-fe.h header
*** 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 …
Run Code Online (Sandbox Code Playgroud)

macos ruby-on-rails libpq pg postgresql-9.1

96
推荐指数
7
解决办法
8万
查看次数

标签 统计

libpq ×1

macos ×1

pg ×1

postgresql-9.1 ×1

ruby-on-rails ×1