Skip to content

Instantly share code, notes, and snippets.

@redrick
Created November 1, 2011 08:15
Show Gist options
  • Save redrick/1330137 to your computer and use it in GitHub Desktop.
Save redrick/1330137 to your computer and use it in GitHub Desktop.
unable to install pg gem - *** extconf.rb failed ***
(Operating system is Fedora 2.6.40.6-0.fc15.i686)
Hi there quiet recently I had a big problem with this guy - gem install pg
It threw me :
$ gem install pg
Building native extensions. This could take a while...
ERROR: Error installing pg:
ERROR: Failed to build gem native extension.
/home/andrej/.rvm/rubies/ruby-1.9.2-p290/bin/ruby extconf.rb
checking for pg_config... yes
Using config values from /usr/bin/pg_config
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.
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=/home/andrej/.rvm/rubies/ruby-1.9.2-p290/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
Gem files will remain installed in /home/andrej/.rvm/gems/ruby-1.9.2-p290@c/gems/pg-0.11.0 for inspection.
Results logged to /home/andrej/.rvm/gems/ruby-1.9.2-p290@c/gems/pg-0.11.0/ext/gem_make.out
and I was kind of unable to find it, but now i got it:
AND THE MAGIC TRICK :
is that you do not have this installed -- > postgres-devel
so go get it :
sudo yum install postgresql-devel
Thats all... than just gem install pg and there it goes :D such a silly mistake :D
@equivalent
Copy link

thanx mate, it helped

@mondaini
Copy link

It helped me too. Thanks!

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