gpt4 book ai didi

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

转载 作者:IT王子 更新时间:2023-10-29 01:01:02 25 4
gpt4 key购买 nike

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/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com