Wednesday, 4 April 2012

Error installing pg gem in Linux

If installing the pg gem in Linux fails with this error:

checking for pg_config... no
No pg_config... trying anyway. If building fails, please try again with
checking for libpq-fe.h... no
Can't find the 'libpq-fe.h header
*** 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.
 An error occured while installing pg (0.13.2), and Bundler cannot continue.

Installing libpq-dev should solve the problem.
 sudo apt-get install libpq-dev  

No comments:

Post a Comment

Please leave a comment if you find this blog helpful or interesting! I'd love to hear from you!