Prev: Counting a string
Next: Execute a stub written in plsql
From: Saeed Bhuta on 1 Mar 2010 03:56 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" -- Posted via http://www.ruby-forum.com/.
From: Reid Thompson on 1 Mar 2010 08:45 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"
From: Reid Thompson on 1 Mar 2010 08:48 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: I believe the libecpg-dev package would only provide the required packages for developing embedded sql programs. Open synaptic, scroll down to the postgresql section, and look at the available packages. Make sure you have appropriate server and client packages installed as well as their associated dev packages.
From: Saeed Bhuta on 1 Mar 2010 09:19 Here is the result of the '$ dpkg --get-selections' command; http://pastebin.com/6SRaW4KL Looked in Synaptic, seemed like all the right server and client packages were installed. -- Posted via http://www.ruby-forum.com/.
From: Lars Haugseth on 1 Mar 2010 10:33
* Saeed Bhuta <saeed.bhuta(a)placr.co.uk> wrote: > > Here is the result of the '$ dpkg --get-selections' command; > http://pastebin.com/6SRaW4KL > > Looked in Synaptic, seemed like all the right server and client packages > were installed. Looks like you're missing the libpq5 and libpq-dev packages. -- Lars Haugseth |