I'm trying to install pgpool-II in Ubuntu 13.10 environment. I'm following this tutorial to get it done.
I get below error.
configure: error: libpq is not installed or libpq is old
From the docs.
Note: pgpool-II requires libpq library in PostgreSQL 7.4 or later (version 3 protocol). If configure script displays the following error message, libpq library may not be installed, or it is not of version 3.
configure: error: libpq is not installed or libpq is old
If the library is version 3, but above message is still displayed, your libpq library is probably not recognized by configure script.
configure script searches for libpq library under /usr/local/pgsql libaray. If you have installed PostgreSQL to a directory other than /usr/local/pgsql, use --with-pgsql, or --with-pgsql-includedir and --with-pgsql-libdir command line options when you execute configure.
I'm using below command to fix it as instructed but it does not work.
./configure --with-pgsql-includedir /usr/lib/
I also followed this from Database Administrators Stack Exchange too.
How can I fix this?
When compiling programs that require libpq
, the Ubuntu package that must be installed is libpq-dev
.
That being said, concerning pgpool II, it doesn't need to be compiled from source because it's available as a package in the main repository:
$ apt-cache search pgpool2
pgpool2 - connection pool server and replication proxy for PostgreSQL
so it would be easier to run
sudo apt-get install pgpool2
to install the package.