我正在尝试在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.
我尝试安装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
他们中的任何人都没有运气。有什么建议?提前谢谢。
答案 0 :(得分:5)
brew install postgres
或
gem install pg
答案 1 :(得分:1)
您可能需要将pg_config
放在PATH
上。您需要确保PostgreSQL直接在/usr/local/
中可用(不仅仅是在Homebrew Cellar
中),然后:
export PATH=$PATH:/usr/local/bin
并确保运行:
pg_config --version
发出类似:
的内容$ pg_config --version
PostgreSQL 9.2.5
答案 2 :(得分:1)
我解决了这个问题..你在安装ruby gems时可能做了什么,你忘了在你的mac上安装postgres sql ....我是在我的mac上运行metasploit时做同样的事情...所以我做错了是我安装了postgres sql但它最终出现了错误,我确实放手了......所以我终于想通了我应该安装postgres sql来使pg 0.16 gem来做工作
所以你需要做的是
GOTO POSTGRES OFFICIAL WEBSITE 并下载用于MAC的GUI包装,大约52.37 MB
安装
在您的航站楼运行“BUNDLER”
如果它显示错误登录为根
然后再来 并且很好地安装
现在我认为你必须考虑如何以根本身份登录
所以,这是怎么做的
2.USER&组
3.点击登录选项(它正好在+和 - 符号上方)
5.现在在右侧会有一个按钮,即JOIN点击它
6.然后在弹出窗口中单击打开的网络目录实用程序
8.点击编辑>>启用root
你完成了
现在退出
现在您将获得两个气球(如果您拥有单个用户帐户,则可以更多)点击最后一个类型根作为用户名,并在您创建密码时知道密码
然后再次运行捆绑程序安装,你就完成了