首页 > OS X安装Postgresql报错

OS X安装Postgresql报错

Postgresql是用Postgres.app安装的,打开后本地安装pg的gem包的时候就报以下错误:

Building native extensions.  This could take a while...
ERROR:  Error installing pg:
    ERROR: Failed to build gem native extension.

    /Users/supernova/.rvm/rubies/ruby-2.1.3/bin/ruby -r ./siteconf20141019-63336-1auq2h0.rb 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
    --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=/Users/Alfred/.rvm/rubies/ruby-2.1.3/bin/ruby
    --with-pg
    --without-pg
    --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}/lib

extconf failed, exit code 1

请问怎么解决?


在这里问还不如Google


https://github.com/PostgresApp/PostgresApp/issues/187


用 brew 安装试试?

【热门文章】
【热门文章】