2016-09-15 56 views
0

我遇到下面的错误运行bundle install错误,并且捆扎机不能继续

红宝石2.3已安装,但红宝石2.2.2正在通过RVM使用时 - rvm use 2.2.2,但我不认为多数民众赞成在这个问题是

的问题包括以下

[email protected]:~/Desktop/em-client$ bundle install 
    Fetching gem metadata from https://rubygems.org/............. 
    Fetching version metadata from https://rubygems.org/... 
    Fetching dependency metadata from https://rubygems.org/.. 
    Using rake 11.1.1 
    Using i18n 0.7.0 
    Using json 1.8.3 
    Using minitest 5.8.4 
    Using thread_safe 0.3.5 
    Using builder 3.2.2 
    Using erubis 2.7.0 
    Using mini_portile2 2.0.0 
    Using rack 1.6.4 
    Using mime-types 2.99.1 
    Using arel 6.0.3 
    Using bcrypt 3.1.11 
    Using coderay 1.1.1 
    Using debug_inspector 0.0.2 
    Using thor 0.19.1 
    Using bundler 1.13.1 
    Using concurrent-ruby 1.0.1 
    Using byebug 8.2.2 
    Using chronic 0.10.2 
    Using coffee-script-source 1.10.0 
    Using execjs 2.6.0 
    Using orm_adapter 0.5.0 
    Using multi_json 1.11.2 
    Using tilt 2.0.2 
    Using multi_xml 0.5.5 
    Using method_source 0.8.2 
    Installing pg 0.18.4 with native extensions 
    Using slop 3.6.0 
    Using puma 3.2.0 
    Using rails_serve_static_assets 0.0.5 
    Using rails_stdout_logging 0.0.4 
    Using sass 3.4.21 
    Using spring 1.6.4 
    Using sqlite3 1.3.11 
    Using rdoc 4.2.2 
    Using tzinfo 1.2.2 
    Using nokogiri 1.6.7.2 
    Using rack-test 0.6.3 
    Using warden 1.2.6 
    Using mail 2.6.3 
    Using better_errors 2.1.1 
    Using binding_of_caller 0.7.2 
    Using sprockets 3.5.2 
    Using whenever 0.9.7 
    Using coffee-script 2.4.1 
    Using uglifier 2.7.2 
    Using rollbar 2.12.0 
    Using httparty 0.13.7 
    Gem::Ext::BuildError: ERROR: Failed to build gem native extension. 

    /home/jon220/.rvm/rubies/ruby-2.2.2/bin/ruby -r 
    ./siteconf20160915-12645-sijcbm.rb 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/jon220/.rvm/rubies/ruby-2.2.2/bin/$(RUBY_BASE_NAME) 
     --with-pg 
     --without-pg 
     --enable-windows-cross 
     --disable-windows-cross 
     --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 

    extconf failed, exit code 1 

    Gem files will remain installed in 
    /home/jon220/.rvm/gems/ruby-2.2.2/gems/pg-0.18.4 for inspection. 
    Results logged to 
    /home/jon220/.rvm/gems/ruby-2.2.2/extensions/x86_64-linux/2.2.0/pg-0.18.4/gem_make.out 

    An error occurred while installing pg (0.18.4), and Bundler cannot 
    continue. 
    Make sure that `gem install pg -v '0.18.4'` succeeds before bundling. 

任何帮助,将不胜感激

回答

0

安装postgresql-devel软件包,这样可以解决问题

sudo apt-get install libpq-dev 
+1

如果你的问题解决了,你可以接受和提出答案,这样可以帮助其他人 – Navin

相关问题