我已经尝试安装包libpq-dev,并安装postgresql,但由于gem pg,包安装仍然失败。这是我得到的错误:无法安装gem pg -v'0.15.1'
$ gem install pg -v '0.15.1'
Building native extensions. This could take a while...
/.rvm/rubies/ruby-1.9.3-
p484/lib/ruby/site_ruby/1.9.1/rubygems/ext/builder.rb:73: warning: Insecure
world writable dir /usr/local in PATH, mode 040777
ERROR: Error installing pg:
ERROR: Failed to build gem native extension.
/.rvm/rubies/ruby-1.9.3-p484/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.
什么是清理混乱的正确方法?
你在运行什么操作系统?你是如何安装postgres的? – Josh
Mac OS Mavericks,我通过'postgresql-9.3.2-3-osx'文件安装了它,但我仍然不确定它出错的地方。 – blueseal