From: Luis Lavena Date: 2010-03-05T01:25:15+09:00 Subject: Re: Installing Pg gem for PostGreSQL 8.4 On Mar 3, 5:18 pm, Saeed Bhuta wrote: > Reid Thompson wrote: > > On Wed, 2010-03-03 at 23:59 +0900, Saeed Bhuta wrote: > > >> -rw-r--r-- 1 root root  7583 2009-09-09 17:49 pg_config_manual.h > >> drwxr-xr-x 3 root root  4096 2010-03-02 10:13 8.4 > > hmm -- until today, on my box > > > $ sudo gem install pg > > > resulted in 0.8.0 being installed > > > today, it installed 0.9.0. > > > try this > > > in your gems directory, remove the 0.9.0 directory > > (on my box this is at /usr/lib/ruby/gems/1.8/gems/pg-0.9.0) > > > then try the install again > > > $ sudo gem install pg > > Deleted the directory and tried the install again but no luck; > sudo gem install pg > Building native extensions.  This could take a while... > ERROR:  Error installing pg: >   ERROR: Failed to build gem native extension. > > /usr/bin/ruby1.8 extconf.rb > checking for pg_config... yes > checking for libpq-fe.h... yes > checking for libpq/libpq-fs.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) > Can you post the contents of mkmf.log that are located here: /var/lib/ gems/1.8/gems/pg-0.9.0/ext Seems that it finds the headers, the pg_config tool, but It cannot link to it, which may be related to 32/64 bits binaries. -- Luis Lavena