From: Reid Thompson Date: 2010-03-01T22:45:40+09:00 Subject: Re: Installing Pg gem for PostGreSQL 8.4 Run this... $ dpkg --get-selections and paste the results in a pastebin. At this point, the gems is stating that it cannot find libpq ( the postgresql C client library ). Do you have the postgresql client packages installed? reid On Mon, 2010-03-01 at 17:56 +0900, Saeed Bhuta wrote: > Saeed Bhuta wrote: > > Shashank Tiwari wrote: > >> Are you installing this on a mac, windows or a linux environment? You > >> may > >> need to make sure your C/C++ compiler is configured on the platform for > >> the > >> native extensions to compile and install. > >> > >> Thanks, Shashank > > I just installed the 'libecpg-dev' package and am now getting the > following error when trying to install the pg gem: > > "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) > *** 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. > > Provided configuration options: > --with-opt-dir > --without-opt-dir > --with-opt-include > --without-opt-include=${opt-dir}/include > --with-opt-lib > --without-opt-lib=${opt-dir}/lib > --with-make-prog > --without-make-prog > --srcdir=. > --curdir > --ruby=/usr/bin/ruby1.8 > --with-pg > --without-pg > --with-pg-config > --without-pg-config > --with-pg-dir > --without-pg-dir > --with-pg-include > --without-pg-include=${pg-dir}/include > --with-pg-lib > --without-pg-lib=${pg-dir}/lib > --enable-static-build > --disable-static-build > --with-pqlib > --without-pqlib > --with-libpqlib > --without-libpqlib > --with-ms/libpqlib > --without-ms/libpqlib > > > Gem files will remain installed in /var/lib/gems/1.8/gems/pg-0.9.0 for > inspection. > Results logged to /var/lib/gems/1.8/gems/pg-0.9.0/ext/gem_make.out"