相关疑难解决方法(0)

在尝试安装pg gem时找不到'libpq-fe.h标头

我正在使用Ruby on Rails 3.1预发行版.我喜欢使用PostgreSQL,但问题是安装pggem.它给了我以下错误:

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

        /home/u/.rvm/rubies/ruby-1.9.2-p0/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 …
Run Code Online (Sandbox Code Playgroud)

postgresql ruby-on-rails pg ruby-on-rails-3 rails-postgresql

753
推荐指数
25
解决办法
27万
查看次数