无法在Ubuntu 12.10上安装pg gem [英] Not able to install pg gem on Ubuntu 12.10
本文介绍了无法在Ubuntu 12.10上安装pg gem的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我使用的是Ubuntu 12.10 64位,我安装了以下软件包:
dpkg --get-selections | grep postgre
输出:
的PostgreSQL
的PostgreSQL-9.1
的PostgreSQL客户端
的PostgreSQL客户端-9.1
的PostgreSQL-客户共同
的PostgreSQL共用
PostgreSQL相关的contrib
PostgreSQL相关的contrib-9.1
的PostgreSQL服务器-DEV-9.1
的PostgreSQL服务器-DEV-所有
的libpq-dev的
libpq5
rvm 1.17.9
ruby 1.9.3p362(2012-12-25 revision 38607)[x86_64-linux]
我无法安装pg gem我收到以下错误:
错误:安装pg时出错:
错误:无法构建gem原生扩展。
/home/vedarthk/.rvm/rubies/ruby-1.9.3-p362/bin/ruby extconf.rb
检查pg_config ...是
使用配置值从/ usr / bin / pg_config
检查libpq-fe.h ...是
检查libpq / libpq-fs.h ...是
检查pg_config_manual.h .. 。yes
在-lpq中检查PQconnectdb()... no
在-llibpq中检查PQconnectdb()... no
在-lms / libpq中检查PQconnectdb() 。no
找不到PostgreSQL客户端库(libpq)
我也试过以下命令,但输出与上面相同:
gem install pg - --with-pg-include = / usr / include / postgresql / libpq --with-pg-lib = / usr / lib / postgresql / 9.1 / lib
gem install pg - --with-pg-include = / usr / include / postgresql --with-pg-lib = / usr / lib / postgresql / 9.1 / lib
解决方案
尝试安装PostgreSQL开发头文件:
sudo apt-get inst所有libpq-dev
I am using Ubuntu 12.10 64-bit and I have following packages installed :
dpkg --get-selections | grep postgre
output:
postgresql
postgresql-9.1
postgresql-client
postgresql-client-9.1
postgresql-client-common
postgresql-common
postgresql-contrib
postgresql-contrib-9.1
postgresql-server-dev-9.1
postgresql-server-dev-all
libpq-dev
libpq5
rvm 1.17.9
ruby 1.9.3p362 (2012-12-25 revision 38607) [x86_64-linux]
I am not able to install pg gem I am getting following error :
ERROR: Error installing pg:
ERROR: Failed to build gem native extension.
/home/vedarthk/.rvm/rubies/ruby-1.9.3-p362/bin/ruby extconf.rb
checking for pg_config... yes
Using config values from /usr/bin/pg_config
checking for libpq-fe.h... yes
checking for libpq/libpq-fs.h... yes
checking for pg_config_manual.h... yes
checking for PQconnectdb() in -lpq... no
checking for PQconnectdb() in -llibpq... no
checking for PQconnectdb() in -lms/libpq... no
Can't find the PostgreSQL client library (libpq)
I have also tried following commands but the output is same as above :
gem install pg -- --with-pg-include=/usr/include/postgresql/libpq --with-pg-lib=/usr/lib/postgresql/9.1/lib
gem install pg -- --with-pg-include=/usr/include/postgresql --with-pg-lib=/usr/lib/postgresql/9.1/lib
解决方案
Try installing PostgreSQL development headers:
sudo apt-get install libpq-dev
这篇关于无法在Ubuntu 12.10上安装pg gem的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文