加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > Linux > 正文

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

发布时间:2020-12-13 19:32:10 所属栏目:Linux 来源:网络整理
导读: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 .bashrcPATH=/usr/pgsql-9.2/bin:$PATH

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

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读