简体   繁体   English

Ubuntu 12.10无法安装pg gem?

[英]Ubuntu 12.10 can't install pg gem?

I have read every article I can find on this but seem to have the problem despite having tried the various recommendations. 我已经阅读了所有可以找到的文章,但是尽管尝试了各种建议,但似乎还是有问题。

I am using RVM on Ubuntu 12.10. 我在Ubuntu 12.10上使用RVM。 All my other gems are installing fine but the pg gem is failing with: 我所有其他的gem都安装正常,但是pg gem失败了:

Can't find the PostgreSQL client library (libpq)

I am using the postgresql repository described here: http://wiki.postgresql.org/wiki/Apt 我正在使用此处描述的postgresql存储库: http : //wiki.postgresql.org/wiki/Apt

I have used apt-get to install the following: 我已经使用apt-get安装了以下内容:

postgresql-9.1 PostgreSQL的9.1
postgresql-client-9.1 PostgreSQL客户端9.1
postgresql-server-dev-9.1 PostgreSQL服务器开发版9.1
libpq-dev libpq开发
build-essential 必要的
pgadmin3 pgadmin3

This is a clean install of Ubuntu 12.10 just loaded and updated today. 这是今天才加载并更新的Ubuntu 12.10的全新安装。

I installed ruby 1.9.3-p392 via RVM. 我通过RVM安装了ruby 1.9.3-p392。

pg_config output: pg_config输出:

    BINDIR = /usr/lib/postgresql/9.1/bin
DOCDIR = /usr/share/doc/postgresql-doc-9.1
HTMLDIR = /usr/share/doc/postgresql-doc-9.1
INCLUDEDIR = /usr/include/postgresql
PKGINCLUDEDIR = /usr/include/postgresql
INCLUDEDIR-SERVER = /usr/include/postgresql/9.1/server
LIBDIR = /usr/lib
PKGLIBDIR = /usr/lib/postgresql/9.1/lib
LOCALEDIR = /usr/share/locale
MANDIR = /usr/share/postgresql/9.1/man
SHAREDIR = /usr/share/postgresql/9.1
SYSCONFDIR = /etc/postgresql-common
PGXS = /usr/lib/postgresql/9.1/lib/pgxs/src/makefiles/pgxs.mk
CONFIGURE = '--with-tcl' '--with-perl' '--with-python' '--with-pam' '--with-krb5' '--with-gssapi' '--with-openssl' '--with-libxml' '--with-libxslt' '--with-ldap' '--with-tclconfig=/usr/lib/tcl8.5' '--with-tkconfig=/usr/lib/tk8.5' '--with-includes=/usr/include/tcl8.5' 'PYTHON=/usr/bin/python' '--mandir=/usr/share/postgresql/9.1/man' '--docdir=/usr/share/doc/postgresql-doc-9.1' '--sysconfdir=/etc/postgresql-common' '--datarootdir=/usr/share/' '--datadir=/usr/share/postgresql/9.1' '--bindir=/usr/lib/postgresql/9.1/bin' '--libdir=/usr/lib/' '--libexecdir=/usr/lib/postgresql/' '--includedir=/usr/include/postgresql/' '--enable-nls' '--enable-integer-datetimes' '--enable-thread-safety' '--enable-debug' '--disable-rpath' '--with-ossp-uuid' '--with-gnu-ld' '--with-pgport=5432' '--with-system-tzdata=/usr/share/zoneinfo' 'CFLAGS=-g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -fPIC -pie' 'CPPFLAGS=-D_FORTIFY_SOURCE=2 -DLINUX_OOM_ADJ=0' 'LDFLAGS=-Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now -Wl,--as-needed'
CC = gcc
CPPFLAGS = -D_FORTIFY_SOURCE=2 -DLINUX_OOM_ADJ=0 -D_GNU_SOURCE -I/usr/include/libxml2 -I/usr/include/tcl8.5
CFLAGS = -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -fPIC -pie -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -g
CFLAGS_SL = -fpic
LDFLAGS = -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -L/usr/lib -Wl,--as-needed
LDFLAGS_EX = 
LDFLAGS_SL = 
LIBS = -lpgport -lxslt -lxml2 -lpam -lssl -lcrypto -lkrb5 -lcom_err -lgssapi_krb5 -lz -ledit -lcrypt -ldl -lm 
VERSION = PostgreSQL 9.1.8

Try installing PostgreSQL developmenmt headers: 尝试安装PostgreSQL developmentmen标头:

sudo apt-get install libpq-dev 须藤apt-get install libpq-dev

See also How to install PostgreSQL's pg gem on Ubuntu? 另请参阅如何在Ubuntu上安装PostgreSQL的pg gem?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM