How to install libpq-dev on Centos 5.5
86,305
Solution 1
The package is called postgresql-libs
on Red Hat and derived distributions.
Solution 2
I just had to install this on my CentOS 6 server since psycopg2 required pg_config. Boo yah:
yum install postgresql-devel
Update
If you still encounter issues with pg_config, you may need to add it to your PATH, e.g.:
export PATH=$PATH:/usr/pgsql-x.x/bin
where x.x is your version, such as /usr/pgsql-9.2./bin.
Solution 3
It is libpqxx
:
Name : libpqxx-devel
Arch : x86_64
Version : 2.6.9
Release : 3.el5.rf
Size : 1.4 M
Repo : rpmforge
Summary : Header files, libraries and development documentation for libpqxx.
URL : http://pqxx.org/
License : BSD
Description: This package contains the header files, static libraries and development
: documentation for libpqxx. If you like to develop programs using libpqxx,
: you will need to install libpqxx-devel.
You can install it from rpmforge or epel repo:
# yum install libpqxx-devel
Related videos on Youtube
Author by
larry
Updated on September 18, 2022Comments
-
larry over 1 year
In order to develop one web application based on postgresql, i need to install libpq on my centos.
I can install it by "apt-get install libpq-dev" on ubuntu, but i can not install it on centos by "yum install libpq".
Who can tell me how to install it, thanks!
-
Peter Eisentraut over 12 yearsNo, that's a different package.
-
Greg Petersen over 12 years
xx
meansC++
. -
Tom Dalling almost 12 yearsThis worked for me (I also needed pg_config to install psycopg2)
-
lcrimsonl over 10 yearsremember, if you are trying to do a global install (sudo pip install psycopg2) to add it to the right path. Wasn't working for me, even after supplying -
-install-option
withpip install
and then I realized I was doing sudo pip install. -
Albert.Qing almost 10 yearsUsefull answer.so many answer tell me install libpq-dev!
-
Brian Minton almost 4 years
postgresql-libs
is the shared library. However,postgresql-devel
is the development code (equivalent to Debian'slibpg-dev
). -
Appleoddity almost 3 yearsAs mentioned, this is not the equivalent to libpq-dev. The correct answer is postgresql-devel.