捆绑安装pg不会工作,mac os yosemite。我尝试了一切

时间:2015-07-09 06:12:06

标签: ruby-on-rails ruby postgresql

我有一个我想开始使用的rails应用程序,但我无法解决这个错误。我无法安装pg -v -0.10.1 gem我试过从我的整个系统重新安装Postgressql并且没有用。我试过运行下面的命令,它运行成功,但我仍然无法成功运行bundle install。

env ARCHFLAGS="-arch x86_64" gem install pg 

I followed the instructions of this thread step by step but no cigar.

我只是不断收到以下错误消息。

`Building native extensions with: '--with-pg-config= /usr/local/bin/pg_config'
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 --with-pg-config= /usr/local/bin/pg_config
Using config values from 
sh: : command not found
sh: : command not found
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
        --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
    enter code here

Gem files will remain installed in /Library/Ruby/Gems/2.0.0/gems/pg-0.18.2 for inspection.
Results logged to /Library/Ruby/Gems/2.0.0/gems/pg-0.18.2/ext/gem_make.out`

0 个答案:

没有答案