在OS X 10.9上以pg(0.16.0)捆绑安装错误

use*_*932 2 ruby postgresql pg metasploit osx-mavericks

我想在OS X 10.9上安装metasploit.我运行捆绑安装的所有东西,在installing pg (0.16.0)它错误输出

/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/universal-darwin13/rbconfig.rb:212: warning: Insecure world writable dir /usr/local in PATH, mode 040777
Fetching gem metadata from https://rubygems.org/.........
Fetching gem metadata from https://rubygems.org/..
Using rake (10.1.0) 
Using i18n (0.6.5) 
Using multi_json (1.0.4) 
Using activesupport (3.2.14) 
Using builder (3.0.4) 
Using activemodel (3.2.14) 
Using arel (3.0.2) 
Using tzinfo (0.3.37) 
Using activerecord (3.2.14) 
Using database_cleaner (1.1.1) 
Using diff-lcs (1.2.4) 
Using factory_girl (4.2.0) 
Using fivemat (1.2.1) 
Using json (1.8.0) 
Installing pg (0.16.0) 
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

    /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb 
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/universal-darwin13/rbconfig.rb:212: warning: Insecure world writable dir /usr/local in PATH, mode 040777
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
    --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
    --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}/


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

An error occurred while installing pg (0.16.0), and Bundler cannot continue.
Make sure that `gem install pg -v '0.16.0'` succeeds before bundling.
Run Code Online (Sandbox Code Playgroud)

我试图安装pg -v '0.16.0'没有运气pg --without=pg和pg -v '0.16.0' -- --with-pg-config=/usr/local/Cellar/postgresql/9.3.1/bin/pg_config

他们中的任何人都没有运气.有什么建议?提前致谢.

小智 5

brew安装postgres

要么

宝石安装pg