gem install pg give the following error, please help how can i solve this Building native extensions. This could take a while... ERROR: Error installing pg: ERROR: Failed to build gem native extension. /home/saravanan/.rvm/rubies/ruby-1.9.3-p194/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... 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 --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=/home/saravanan/.rvm/rubies/ruby-1.9.3-p194/bin/ruby --with-pg --without-pg --with-pg-dir --without-pg-dir --with-pg-include --without-pg-include=${pg-dir}/include --with-pg-lib --without-pg-lib=${pg-dir}/lib --with-pg-config --without-pg-config --with-pg_config --without-pg_config --with-pqlib --without-pqlib --with-libpqlib --without-libpqlib --with-ms/libpqlib --without-ms/libpqlib Gem files will remain installed in /home/saravanan/.rvm/gems/ruby-1.9.3-p194/gems/pg-0.14.1 for inspection. Results logged to /home/saravanan/.rvm/gems/ruby-1.9.3-p194/gems/pg-0.14.1/ext/gem_make.out -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/MPS_zdkBAPcJ. For more options, visit https://groups.google.com/groups/opt_out.
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 09/18/2012 01:29 AM, Saravanan P wrote:> gem install pg give the following error, please help how can i > solve this > > Building native extensions. This could take a while... ERROR: > Error installing pg: ERROR: Failed to build gem native extension.The pg gem is only a way to communicate with the Postgres server; make sure you have postgresql and postgresql-dev installed on your system (with Linux, there should be apt or rpm packages available; not sure about Windows). ~Chris - -- Chris Maden, text nerd <URL: http://crism.maden.org/ > LIVE FREE: vote for Gary Johnson, Libertarian for President. <URL: http://garyjohnson2012.com/ > <URL: http://lp.org/ > GnuPG fingerprint: DB08 CF6C 2583 7F55 3BE9 A210 4A51 DBAC 5C5C 3D5E -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://www.enigmail.net/ iQEcBAEBAgAGBQJQWAc0AAoJEEpR26xcXD1etjkH/R+M6ywCsMptwDpG2NvQxp0I QULmxdflzw0V5/c50trpd+DFo3gkQuKLuMchTZ6akcckp7+IFUy8yd1sPAfheXOF UympBgajZMYeqv1EGSJEGq0XKtR9a28s97NxPzxzddbqtoswmxnl9hgLVunuK2il 135FUGxxRgRbJhbfmbCYzR+a5r32FxP+lc8fODJCHEWhQhyxlfJryTTHW6YXp88r lDWN545LYUMmL/4rupI45vusIxeom70wrMFeXug5qdk1urkL/nxTAR8kG1Zp2+8w 4NlrRckzbWutjJNTMK3NuPQTOcWFXeg7jjJUY4CJDtF3zr6NEdBSwvVwqYoCRh0=34RQ -----END PGP SIGNATURE----- -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.
i already installed postgresql. "postgresql-dev" i think its not a package, did you mean "libpq-dev". if yes i already installed that too. i am using ubuntu 12.04. In my error 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... no checking for PQconnectdb() in -llibpq... no checking for PQconnectdb() in -lms/libpq... no saying PQconnectdb() in -lpq... no, which mean? On Tue, Sep 18, 2012 at 11:01 AM, Christopher R. Maden <crism-KB/imElbUW3YtjvyW6yDsg@public.gmane.org>wrote:> -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On 09/18/2012 01:29 AM, Saravanan P wrote: > > gem install pg give the following error, please help how can i > > solve this > > > > Building native extensions. This could take a while... ERROR: > > Error installing pg: ERROR: Failed to build gem native extension. > > The pg gem is only a way to communicate with the Postgres server; make > sure you have postgresql and postgresql-dev installed on your system > (with Linux, there should be apt or rpm packages available; not sure > about Windows). > > ~Chris > - -- > Chris Maden, text nerd <URL: http://crism.maden.org/ > > LIVE FREE: vote for Gary Johnson, Libertarian for President. > <URL: http://garyjohnson2012.com/ > <URL: http://lp.org/ > > GnuPG fingerprint: DB08 CF6C 2583 7F55 3BE9 A210 4A51 DBAC 5C5C 3D5E > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.10 (GNU/Linux) > Comment: Using GnuPG with Mozilla - http://www.enigmail.net/ > > iQEcBAEBAgAGBQJQWAc0AAoJEEpR26xcXD1etjkH/R+M6ywCsMptwDpG2NvQxp0I > QULmxdflzw0V5/c50trpd+DFo3gkQuKLuMchTZ6akcckp7+IFUy8yd1sPAfheXOF > UympBgajZMYeqv1EGSJEGq0XKtR9a28s97NxPzxzddbqtoswmxnl9hgLVunuK2il > 135FUGxxRgRbJhbfmbCYzR+a5r32FxP+lc8fODJCHEWhQhyxlfJryTTHW6YXp88r > lDWN545LYUMmL/4rupI45vusIxeom70wrMFeXug5qdk1urkL/nxTAR8kG1Zp2+8w > 4NlrRckzbWutjJNTMK3NuPQTOcWFXeg7jjJUY4CJDtF3zr6NEdBSwvVwqYoCRh0> =34RQ > -----END PGP SIGNATURE----- > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit https://groups.google.com/groups/opt_out. > > >-- Regards by Saravanan.P -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.
On 18 September 2012 06:29, Saravanan P <saravanan.p-tks5Z7IV8F8RmelmmXo44Q@public.gmane.org> wrote:> gem install pg give the following error, please help how can i solve this > > Building native extensions. This could take a while... > ERROR: Error installing pg: > ERROR: Failed to build gem native extension. > > /home/saravanan/.rvm/rubies/ruby-1.9.3-p194/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... no > checking for PQconnectdb() in -llibpq... no > checking for PQconnectdb() in -lms/libpq... no > Can''t find the PostgreSQL client library (libpq)googling for Can''t find the PostgreSQL client library (libpq) shows a number of hits that may be relevant to your problem Colin -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.
On Ubuntu, there is one libpq-dev ( which you have installed ) and the other is postgresql-server-dev-<version>. I think you need both. -Ashwin On Tue, Sep 18, 2012 at 11:11 AM, Saravanan P <saravanan.p-tks5Z7IV8F8RmelmmXo44Q@public.gmane.org>wrote:> i already installed postgresql. "postgresql-dev" i think its not a > package, did you mean "libpq-dev". if yes i already installed that too. i > am using ubuntu 12.04. In my error > > 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... no > checking for PQconnectdb() in -llibpq... no > checking for PQconnectdb() in -lms/libpq... no > > saying PQconnectdb() in -lpq... no, which mean? > > > On Tue, Sep 18, 2012 at 11:01 AM, Christopher R. Maden <crism-KB/imElbUW3YtjvyW6yDsg@public.gmane.org>wrote: > >> -----BEGIN PGP SIGNED MESSAGE----- >> Hash: SHA1 >> >> On 09/18/2012 01:29 AM, Saravanan P wrote: >> > gem install pg give the following error, please help how can i >> > solve this >> > >> > Building native extensions. This could take a while... ERROR: >> > Error installing pg: ERROR: Failed to build gem native extension. >> >> The pg gem is only a way to communicate with the Postgres server; make >> sure you have postgresql and postgresql-dev installed on your system >> (with Linux, there should be apt or rpm packages available; not sure >> about Windows). >> >> ~Chris >> - -- >> Chris Maden, text nerd <URL: http://crism.maden.org/ > >> LIVE FREE: vote for Gary Johnson, Libertarian for President. >> <URL: http://garyjohnson2012.com/ > <URL: http://lp.org/ > >> GnuPG fingerprint: DB08 CF6C 2583 7F55 3BE9 A210 4A51 DBAC 5C5C 3D5E >> -----BEGIN PGP SIGNATURE----- >> Version: GnuPG v1.4.10 (GNU/Linux) >> Comment: Using GnuPG with Mozilla - http://www.enigmail.net/ >> >> iQEcBAEBAgAGBQJQWAc0AAoJEEpR26xcXD1etjkH/R+M6ywCsMptwDpG2NvQxp0I >> QULmxdflzw0V5/c50trpd+DFo3gkQuKLuMchTZ6akcckp7+IFUy8yd1sPAfheXOF >> UympBgajZMYeqv1EGSJEGq0XKtR9a28s97NxPzxzddbqtoswmxnl9hgLVunuK2il >> 135FUGxxRgRbJhbfmbCYzR+a5r32FxP+lc8fODJCHEWhQhyxlfJryTTHW6YXp88r >> lDWN545LYUMmL/4rupI45vusIxeom70wrMFeXug5qdk1urkL/nxTAR8kG1Zp2+8w >> 4NlrRckzbWutjJNTMK3NuPQTOcWFXeg7jjJUY4CJDtF3zr6NEdBSwvVwqYoCRh0>> =34RQ >> -----END PGP SIGNATURE----- >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Ruby on Rails: Talk" group. >> To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> To unsubscribe from this group, send email to >> rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> For more options, visit https://groups.google.com/groups/opt_out. >> >> >> > > > -- > Regards by > Saravanan.P > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit https://groups.google.com/groups/opt_out. > > >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.
Thanks I already installed libpq-dev package and now only i installed postgresql-server-dev-9.1 package. But no luck still same error :( any help! Building native extensions. This could take a while... ERROR: Error installing pg: ERROR: Failed to build gem native extension. /home/saravanan/.rvm/rubies/ruby-1.9.3-p194/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... 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 --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=/home/saravanan/.rvm/rubies/ruby-1.9.3-p194/bin/ruby --with-pg --without-pg --with-pg-dir --without-pg-dir --with-pg-include --without-pg-include=${pg-dir}/include --with-pg-lib --without-pg-lib=${pg-dir}/lib --with-pg-config --without-pg-config --with-pg_config --without-pg_config --with-pqlib --without-pqlib --with-libpqlib --without-libpqlib --with-ms/libpqlib --without-ms/libpqlib Gem files will remain installed in /home/saravanan/.rvm/gems/ruby-1.9.3-p194/gems/pg-0.14.1 for inspection. Results logged to /home/saravanan/.rvm/gems/ruby-1.9.3-p194/gems/pg-0.14.1/ext/gem_make.out On Tue, Sep 18, 2012 at 7:50 PM, Ashwin Mangale <ashwin.mangale-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>wrote:> On Ubuntu, there is one libpq-dev ( which you have installed ) and the > other is postgresql-server-dev-<version>. I think you need both. > > -Ashwin > > > On Tue, Sep 18, 2012 at 11:11 AM, Saravanan P <saravanan.p-tks5Z7IV8F8RmelmmXo44Q@public.gmane.org>wrote: > >> i already installed postgresql. "postgresql-dev" i think its not a >> package, did you mean "libpq-dev". if yes i already installed that too. i >> am using ubuntu 12.04. In my error >> >> 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... no >> checking for PQconnectdb() in -llibpq... no >> checking for PQconnectdb() in -lms/libpq... no >> >> saying PQconnectdb() in -lpq... no, which mean? >> >> >> On Tue, Sep 18, 2012 at 11:01 AM, Christopher R. Maden <crism-KB/imElbUW3YtjvyW6yDsg@public.gmane.org>wrote: >> >>> -----BEGIN PGP SIGNED MESSAGE----- >>> Hash: SHA1 >>> >>> On 09/18/2012 01:29 AM, Saravanan P wrote: >>> > gem install pg give the following error, please help how can i >>> > solve this >>> > >>> > Building native extensions. This could take a while... ERROR: >>> > Error installing pg: ERROR: Failed to build gem native extension. >>> >>> The pg gem is only a way to communicate with the Postgres server; make >>> sure you have postgresql and postgresql-dev installed on your system >>> (with Linux, there should be apt or rpm packages available; not sure >>> about Windows). >>> >>> ~Chris >>> - -- >>> Chris Maden, text nerd <URL: http://crism.maden.org/ > >>> LIVE FREE: vote for Gary Johnson, Libertarian for President. >>> <URL: http://garyjohnson2012.com/ > <URL: http://lp.org/ > >>> GnuPG fingerprint: DB08 CF6C 2583 7F55 3BE9 A210 4A51 DBAC 5C5C 3D5E >>> -----BEGIN PGP SIGNATURE----- >>> Version: GnuPG v1.4.10 (GNU/Linux) >>> Comment: Using GnuPG with Mozilla - http://www.enigmail.net/ >>> >>> iQEcBAEBAgAGBQJQWAc0AAoJEEpR26xcXD1etjkH/R+M6ywCsMptwDpG2NvQxp0I >>> QULmxdflzw0V5/c50trpd+DFo3gkQuKLuMchTZ6akcckp7+IFUy8yd1sPAfheXOF >>> UympBgajZMYeqv1EGSJEGq0XKtR9a28s97NxPzxzddbqtoswmxnl9hgLVunuK2il >>> 135FUGxxRgRbJhbfmbCYzR+a5r32FxP+lc8fODJCHEWhQhyxlfJryTTHW6YXp88r >>> lDWN545LYUMmL/4rupI45vusIxeom70wrMFeXug5qdk1urkL/nxTAR8kG1Zp2+8w >>> 4NlrRckzbWutjJNTMK3NuPQTOcWFXeg7jjJUY4CJDtF3zr6NEdBSwvVwqYoCRh0>>> =34RQ >>> -----END PGP SIGNATURE----- >>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "Ruby on Rails: Talk" group. >>> To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>> To unsubscribe from this group, send email to >>> rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>> For more options, visit https://groups.google.com/groups/opt_out. >>> >>> >>> >> >> >> -- >> Regards by >> Saravanan.P >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Ruby on Rails: Talk" group. >> To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> To unsubscribe from this group, send email to >> rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> For more options, visit https://groups.google.com/groups/opt_out. >> >> >> > > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit https://groups.google.com/groups/opt_out. > > >-- Regards by Saravanan.P -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.
Did you find a solution? I have the same problem since days! :( Saravanan P wrote in post #1076481:> Thanks > > I already installed libpq-dev package and now only i > installed postgresql-server-dev-9.1 package. But no luck still same > error :( > > any help!-- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.
I am getting crazy about this problem... Basically pg compiles for my system ruby (installed via apt-get), also compiles for my RVM ruby 1.8 BUT when I try to compile it for RVM ruby 1.9 it will fail!!! Why?? Error is always: Can''t find the PostgreSQL client library (libpq) -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.
On 19 September 2012 12:04, Federico R. <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> I am getting crazy about this problem... Basically pg compiles for my > system ruby (installed via apt-get), also compiles for my RVM ruby 1.8 > BUT when I try to compile it for RVM ruby 1.9 it will fail!!! Why??Which 1.9? Is it the same version of the pg gem that in the case that compiles and the one that doesn''t? Colin> > > Error is always: > Can''t find the PostgreSQL client library (libpq) > > -- > Posted via http://www.ruby-forum.com/. > > -- > You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit https://groups.google.com/groups/opt_out. > >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.
1.9.3, I fixed it... I had to rename a "lib" folder inside the .rvm directory, compile the gem separately and then re-rename the folder... -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.
Instead of compiling it by hand, you specify the missing headers in the gem command: rvmsudo gem install pg -- --with-pg-lib=/usr/pgsql/lib/ --with-pg-config=/usr/pgsql/bin/pg_config If you need to bundle install pg (or other gem that uses it), you could use a bundle config file: bundle config build.pg --with-pg-lib=/usr/pgsql/lib/ --with-pg-config=/usr/pgsql/bin/pg_config On Tuesday, September 18, 2012 2:29:02 AM UTC-3, Saravanan P wrote:> > gem install pg give the following error, please help how can i solve this > > Building native extensions. This could take a while... > ERROR: Error installing pg: > ERROR: Failed to build gem native extension. > > /home/saravanan/.rvm/rubies/ruby-1.9.3-p194/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... 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 > --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=/home/saravanan/.rvm/rubies/ruby-1.9.3-p194/bin/ruby > --with-pg > --without-pg > --with-pg-dir > --without-pg-dir > --with-pg-include > --without-pg-include=${pg-dir}/include > --with-pg-lib > --without-pg-lib=${pg-dir}/lib > --with-pg-config > --without-pg-config > --with-pg_config > --without-pg_config > --with-pqlib > --without-pqlib > --with-libpqlib > --without-libpqlib > --with-ms/libpqlib > --without-ms/libpqlib > > > Gem files will remain installed in > /home/saravanan/.rvm/gems/ruby-1.9.3-p194/gems/pg-0.14.1 for inspection. > Results logged to > /home/saravanan/.rvm/gems/ruby-1.9.3-p194/gems/pg-0.14.1/ext/gem_make.out > >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/wlAtjJYfThEJ. For more options, visit https://groups.google.com/groups/opt_out.
My error wasn''t related to any missing headers, pg was being linked with the wrong libraries. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.
This was my exact same problem: http://stackoverflow.com/questions/8814924/gem-install-pg-can-not-bind-to-libpq -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.
Just for your information, the solution posted on stacked overflow fixed my problem... -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.