ruby-on-rails - 无法在 Fedora 17 上安装 PG gem

标签 ruby-on-rails linux postgresql rvm fedora

pg gem 很顽固,所以我无法在新计算机上加载我的应用程序。似乎有多个问题,无法找到 pg_config 和 extconf.rb

#psql working...
psql (9.2.1)
Type "help" for help.

nd =>
\q

$ pg_config:

#adding the path to bashrc...
$ nano .bashrc

PATH=/usr/pgsql-9.2/bin:$PATH

#seems to work...
pg_config: /usr/pgsql-9.2/bin/pg_config

$ sudo gem install pg

#but i get the same errors...
Building native extensions.  This could take a while...
.......
ERROR:  Error installing pg:
        ERROR: Failed to build gem native extension.

        /usr/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.

有没有 linux 人处理过这个问题?

最佳答案

解决了

$ yum install /usr/include/libpq-fe.h

关于ruby-on-rails - 无法在 Fedora 17 上安装 PG gem,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13665712/

相关文章:

ruby-on-rails - 使用 ActiveRecord 在数据库中存储记录的长时间运行的 ruby​​ 进程

linux - 在 ubuntu 终端中列出帐户名称

linux - 在 i3wm 中禁用 float 窗口的边框

c - PostgreSQL 的 bufmgr.c 中的 printf()?

ruby-on-rails - Gmail 的操作邮件程序配置

html - 如何显示前景图像然后在悬停时隐藏?

ruby-on-rails - PostgreSQL 复杂索引类型和排序

Linux Awk - 如何控制输出定界符

postgresql - 优化大型 ST_Intersect 查询,将 1.8m OSM 街道匹配到 317k 多边形

ruby-on-rails - 错误 : Failed to build gem native extension