gpt4 book ai didi

ruby - 无法在 Ubuntu 12.10 上安装 pg gem

转载 作者:太空宇宙 更新时间:2023-11-03 16:05:38 26 4
gpt4 key购买 nike

我正在使用 Ubuntu 12.10 64 位并且安装了以下软件包:

dpkg --get-selections | grep postgre

输出:

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 修订版 38607)[x86_64-linux]

我无法安装 pg gem 我收到以下错误:

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)

我也试过以下命令,但输出与上面相同:

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 install libpq-dev

关于ruby - 无法在 Ubuntu 12.10 上安装 pg gem,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14477825/

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