2016-10-03 4 views
0

pg gemをインストールしていると主張し、その後コンパイルできないと不平を言う理由を知っていますか?これは、宝石が並行してインストールされていないが、pgのインストールを試みてエラーを生成せずにrmagickをインストールし、pgのエラーを生成することを示します。Bundlerはpgをインストールしていると主張していますが、後でインストールできないと苦情を言います(RHEL7)

私がGemfileを見ると、rmagickはpgの前にリストされています...非常に混乱しています。

 
Rubygems 2.0.14 is not threadsafe, so your gems will be installed one at a time. Upgrade to Rubygems 2.1.0 or higher to enable parallel gem installation. 
Using rake 11.3.0 
Using i18n 0.7.0 
Using json 1.8.3 
Using minitest 5.9.1 
Using thread_safe 0.3.5 
Using builder 3.2.2 
Using erubis 2.7.0 
Using mini_portile2 2.1.0 
Using pkg-config 1.1.7 
Using rack 1.6.4 
Using mime-types-data 3.2016.0521 
Using arel 6.0.3 
Using addressable 2.4.0 
Using bundler 1.13.2 
Using coderay 1.1.1 
Using concurrent-ruby 1.0.2 
Using htmlentities 4.3.1 
Using thor 0.19.1 
Using mimemagic 0.3.2 
Using net-ldap 0.12.1 
Installing pg 0.18.4 with native extensions 
Using ruby-openid 2.3.0 
Using rbpdf-font 1.19.0 
Using redcarpet 3.3.4 
Using request_store 1.0.5 
Installing rmagick 2.16.0 with native extensions 
Using tzinfo 1.2.2 
Installing nokogiri 1.6.8 with native extensions 
Using rack-test 0.6.3 
Using mime-types 3.1 
Using css_parser 1.3.7 
Using sprockets 3.7.0 
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension. 

    /usr/bin/ruby extconf.rb 
checking for pg_config... yes 
Using config values from /usr/bin/pg_config 
*** 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}/lib64 
    --with-make-prog 
    --without-make-prog 
    --srcdir=. 
    --curdir 
    --ruby=/usr/bin/ruby 
    --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}/ 
/usr/share/ruby/mkmf.rb:434:in `try_do': The compiler failed to generate an executable file. (RuntimeError) 
You have to install development tools first. 
    from /usr/share/ruby/mkmf.rb:519:in `try_link0' 
    from /usr/share/ruby/mkmf.rb:534:in `try_link' 
    from extconf.rb:36:in `' 


Gem files will remain installed in /tmp/.gem/ruby/gems/pg-0.18.4 for inspection. 
Results logged to /tmp/.gem/ruby/gems/pg-0.18.4/ext/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. 
+1

それはそれをインストールしていることで - これは、これは今日それをインストールしようとしていることを伝えている...それはそれが正常にインストールされていません。この問題を解決するには、このエラーをGoogleに報告してください: 'extconf.rb failed'と' pg gem '(問題はこの部分です: "開発ツールを最初にインストールする必要があります。") –

+0

これは、すべての行"pg 0.18.4をネイティブ拡張でインストールする"の後にpg gemを作成する必要がありますか? pg gemをインストールするには、なぜrmagickをインストールする必要がありますか?具体的には、物事を並行してインストールしていないことを示しています。 – Angelo

+0

私が言ったように、「インストール」という言葉は、「私はちょうど 'gemname'という名前の宝石をインストールしたばかりではありません」と言っているだけです。「このバンドルプロセス中に、私は宝石をインストールします'gemname'と呼ばれるものです。" ... BundlerはあなたのGemfileを見て、インストールが必要なすべての宝石を探します。 ... '' pg'と 'rmagick'の間には、まだどちらもインストールされていないことを除いて、全く接続されていない可能性があります。 –

答えて

0

おそらく、PostgreSQLがインストールされていない可能性があります。私にもmacOSで起こった。私は単にbrew install postgresqlを実行し、再度bundleを実行しました。それ以外のOSを使用している場合は、それに応じてPostgreSQLをインストールする必要があります。
これは、gemで必要とされているすべての不足しているライブラリをインストールすることです。

0

ほとんどの場合、自分のマシンにpostgresqlソフトウェアをインストールしていない可能性があります。 そのため、gemをインストールしようとしているときに、postgresqlソフトウェアのexecutableが見つかりません.Hend bundlerがgemをインストールできません。あなたのマシン上でPostgreSQLをインストールするには

sudo apt-get install postgresql postgresql-contrib #If you are on linux(ubuntu). 

brew install postgresql #If you are on mac 

あなたはあなたの答えを持っている願っています。お楽しみください

関連する問題