bundle update.... failed pg install


症状

[redmine@your_host redmine-2.5]$ bundle update
Fetching gem metadata from https://rubygems.org/........
Fetching gem metadata from https://rubygems.org/........
Fetching gem metadata from https://rubygems.org/..
Fetching gem metadata from https://rubygems.org/..
Resolving dependencies...
Using rake (10.3.2)
Using i18n (0.6.1)
Using multi_json (1.10.1)
Using activesupport (3.2.13)
Using builder (3.0.0)
Using activemodel (3.2.13)
Using erubis (2.7.0)
Using journey (1.0.4)
Using rack (1.4.5)
Using rack-cache (1.2)
Using rack-test (0.6.2)
Using hike (1.2.3)
Using tilt (1.4.1)
Using sprockets (2.2.2)
Using actionpack (3.2.13)
Using mime-types (1.25.1)
Using polyglot (0.3.5)
Using treetop (1.4.15)
Using mail (2.5.4)
Using actionmailer (3.2.13)
Using arel (3.0.3)
Using tzinfo (0.3.41)
Using activerecord (3.2.13)
Using activeresource (3.2.13)
Using bundler (1.3.5)
Using coderay (1.0.9)
Using daemons (1.1.9)
Using eventmachine (1.0.3)
Using holidays (1.0.6)
Using icalendar (2.1.1)
Using rack-ssl (1.3.4)
Using json (1.8.1)
Using rdoc (3.12.2)
Using thor (0.19.1)
Using railties (3.2.13)
Using jquery-rails (2.0.3)
Using net-ldap (0.3.1)
Using nokogiri (1.5.11)
Using open-uri-cached (0.0.5)
Using pdf-core (0.2.5)
Installing pg (0.17.1)
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
        /home/redmine/.rvm/rubies/ruby-1.9.3-p286/bin/ruby extconf.rb
checking for pg_config... no
No pg_config... trying anyway. If building fails, please try again with
 --with-pg-config=/path/to/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/redmine/.rvm/rubies/ruby-1.9.3-p286/bin/ruby
        --with-pg
        --without-pg
        --with-pg-config
        --without-pg-config
        --with-pg_config
        --without-pg_config
        --with-pg-dir
        --without-pg-dir
        --with-pg-include
        --without-pg-include=${pg-dir}/include
        --with-pg-lib
        --without-pg-lib=${pg-dir}/lib

Gem files will remain installed in /home/redmine/.rvm/gems/ruby-1.9.3-p286/gems/pg-0.17.1 for inspection.
Results logged to /home/redmine/.rvm/gems/ruby-1.9.3-p286/gems/pg-0.17.1/ext/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.

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

確認
[redmine@your_host redmine-2.5]$ bundle update
Fetching gem metadata from https://rubygems.org/........
Fetching gem metadata from https://rubygems.org/........
Fetching gem metadata from https://rubygems.org/..
Fetching gem metadata from https://rubygems.org/..
Resolving dependencies...
Using rake (10.3.2)
Using i18n (0.6.1)
Using multi_json (1.10.1)
Using activesupport (3.2.13)
Using builder (3.0.0)
Using activemodel (3.2.13)
Using erubis (2.7.0)
Using journey (1.0.4)
Using rack (1.4.5)
Using rack-cache (1.2)
Using rack-test (0.6.2)
Using hike (1.2.3)
Using tilt (1.4.1)
Using sprockets (2.2.2)
Using actionpack (3.2.13)
Using mime-types (1.25.1)
Using polyglot (0.3.5)
Using treetop (1.4.15)
Using mail (2.5.4)
Using actionmailer (3.2.13)
Using arel (3.0.3)
Using tzinfo (0.3.41)
Using activerecord (3.2.13)
Using activeresource (3.2.13)
Using bundler (1.3.5)
Using coderay (1.0.9)
Using daemons (1.1.9)
Using eventmachine (1.0.3)
Using holidays (1.0.6)
Using icalendar (2.1.1)
Using rack-ssl (1.3.4)
Using json (1.8.1)
Using rdoc (3.12.2)
Using thor (0.19.1)
Using railties (3.2.13)
Using jquery-rails (2.0.3)
Using net-ldap (0.3.1)
Using nokogiri (1.5.11)
Using open-uri-cached (0.0.5)
Using pdf-core (0.2.5)
Installing pg (0.17.1)
Installing ttfunk (1.2.0)
Installing prawn (1.2.1)
Installing ruby-openid (2.3.0)
Installing rack-openid (1.4.2)
Using rails (3.2.13)
Installing rmagick (2.13.3)
Installing thin (1.6.2)
Using yaml_db (0.2.3)
Your bundle is updated!
Gems in the groups test, development, mysql and rmagick were not installed.
参考
http://stackoverflow.com/questions/9234960/gem-install-pg-with-pg-config-works-bundle-fails



コメント

このブログの人気の投稿

pip install mojimoji failed

python import win32com.client -> EOFError in gencache.py