0

I am trying to run bundle install and i get this error

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

    /home/aditya/.rvm/rubies/ruby-2.1.3/bin/ruby extconf.rb --with-pg-config=/usr/bin/pg_config
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/aditya/.rvm/rubies/ruby-2.1.3/bin/ruby
    --with-pg
    --without-pg
    --with-pg-config
    --with-pg-dir
    --without-pg-dir
    --with-pg-include=${pg-dir}/include
    --with-pg-lib
    --without-pg-lib=${pg-dir}/lib

extconf failed, exit code 1

Gem files will remain installed in /home/aditya/.rvm/gems/ruby-2.1.3/gems/pg-0.17.1 for inspection.
Results logged to /home/aditya/.rvm/gems/ruby-2.1.3/extensions/x86_64-linux/2.1.0/pg-0.17.1/gem_make.out
An error occurred while installing pg (0.17.1), and Bundler cannot continue.
Make sure that `gem install pg -v '0.17.1'` succeeds before bundling.

My current version of Postgre is 9.3.4

Please suggest I tried other answer but i can't find answer. I tried to run other commands

bundle config build.pg --with-pg-config=/usr/pgsql-9.1/bin/pg_config  

But I got error

pg: bundle: No such file or directory
pg: config: Is a directory                                                     
pg: build.pg: No such file or directory

I tried solutions of Can't find the 'libpq-fe.h header when trying to install pg gem but its not solving my problem

I also tried re installing libpq-dev getting output

i tried reinstalling

libqp-dev

aditya tiwari [12:07 AM] and output is like

aditya tiwari [12:07 AM] Reading package lists... Done Building dependency tree
Reading state information... Done Suggested packages: postgresql-doc-9.4 The following NEW packages will be installed: libpq-dev

0 upgraded, 1 newly installed, 0 to remove and 11 not upgraded.
Need to get 0 B/158 kB of archives.
After this operation, 932 kB of additional disk space will be used.
Selecting previously unselected package libpq-dev.
(Reading database ... 275104 files and directories currently installed.)
Preparing to unpack .../libpq-dev_9.4.0-1.pgdg12.4+1_amd64.deb ...
Unpacking libpq-dev (9.4.0-1.pgdg12.4+1) ...
Processing triggers for man-db (2.6.7.1-1) ...
Setting up libpq-dev (9.4.0-1.pgdg12.4+1) ...
Community
  • 1
  • 1
Adt
  • 495
  • 6
  • 19

0 Answers0