Skip to content

Instantly share code, notes, and snippets.

@jvidalba1
Created February 10, 2014 15:49
Show Gist options
  • Save jvidalba1/8918272 to your computer and use it in GitHub Desktop.
Save jvidalba1/8918272 to your computer and use it in GitHub Desktop.
Error installing pg gem

This is the error:

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

/home/likewise-open/VISIONAMOS/jvidal/.rvm/rubies/ruby-2.1.0/bin/ruby extconf.rb

checking for pg_config... yes

Using config values from /usr/bin/pg_config

You need to install postgresql-server-dev-X.Y for building a server-side extension or libpq-dev for building a client-side application.

You need to install postgresql-server-dev-X.Y for building a server-side extension or libpq-dev for building a client-side application.

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.

So, we need to try installing libpq-dev (Ubuntu), or postgresql-devel in RedHat Systems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment