How to verify PostgreSQL 9 has installed correctly on a CentOS server?

Posted by A4J on Server Fault See other posts from Server Fault or by A4J
Published on 2012-06-02T23:46:31Z Indexed on 2012/06/03 4:43 UTC
Read the original article Hit count: 589

Filed under:
|
|

I'm trying to install the PG (postgres) gem on a CentoOS server, but it keeps saying Postgres is too old, even though I have upgraded it to 9.1.3 (as per the instructions here http://www.davidghedini.com/pg/entry/install_postgresql_9_on_centos).

I am using CentOS 5.8 (and Ruby 1.9.3)

Here is the error message:

Building native extensions.  This could take a while...
ERROR:  Error installing pg:
    ERROR: Failed to build gem native extension.

        /usr/local/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... yes
checking for PQconnectionUsedPassword()... no
Your PostgreSQL is too old. Either install an older version of this gem or upgrade your database.
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers.  Check the mkmf.log file for more
details.  You may need configuration options.

psql --version confirms my version: psql (PostgreSQL) 9.1.3

I can confirm packages installed:

Setting up Install Process
Package postgresql91-9.1.3-1PGDG.rhel5.x86_64 already installed and latest version
Package postgresql91-devel-9.1.3-1PGDG.rhel5.x86_64 already installed and latest version
Package postgresql91-server-9.1.3-1PGDG.rhel5.x86_64 already installed and latest version
Package postgresql91-libs-9.1.3-1PGDG.rhel5.x86_64 already installed and latest version
Package postgresql91-contrib-9.1.3-1PGDG.rhel5.x86_64 already installed and latest version
Nothing to do

Any ideas on how to troubleshoot this? Thanks in advance.

© Server Fault or respective owner

Related posts about centos

Related posts about postgresql