4

gem install berkshelfFailed to build gecode libraryCentos 6 で失敗します。次の出力で失敗します。

# /opt/chef/embedded/bin/gem install berkshelf
Building native extensions.  This could take a while...
ERROR:  Error installing berkshelf:
    ERROR: Failed to build gem native extension.

        /opt/chef/embedded/bin/ruby extconf.rb
-> sh /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/dep-selector-libgecode-1.0.2/ext/libgecode3/vendor/gecode-3.7.3/configure --prefix=/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/dep-selector-libgecode-1.0.2/lib/dep-selector-libgecode/vendored-gecode --disable-doc-dot --disable-doc-search --disable-doc-tagfile --disable-doc-chm --disable-doc-docset --disable-qt --disable-examples --disable-flatzinc
checking for the host operating system... Linux
checking for g++... no
checking for c++... no
checking for gpp... no
checking for aCC... no
checking for CC... no
checking for cxx... no
checking for cc++... no
checking for cl.exe... no
checking for FCC... no
checking for KCC... no
checking for RCC... no
checking for xlC_r... no
checking for xlC... no
checking whether the C++ compiler works... no
configure: error: in `/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/dep-selector-libgecode-1.0.2/ext/libgecode3/vendor/gecode-3.7.3':
configure: error: C++ compiler cannot create executables
See `config.log' for more details
extconf.rb:98:in `block in run': Failed to build gecode library. (GecodeBuild::BuildError)
    from extconf.rb:97:in `chdir'
    from extconf.rb:97:in `run'
    from extconf.rb:104:in `<main>'


Gem files will remain installed in /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/dep-selector-libgecode-1.0.2 for inspection.
Results logged to /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/dep-selector-libgecode-1.0.2/ext/libgecode3/gem_make.out
4

2 に答える 2

2

インストールさyum install gecode-devel -yれていますが、まだ失敗します。

設定しUSE_SYSTEM_GECODE=1ます。

# env USE_SYSTEM_GECODE=1 /opt/chef/embedded/bin/gem install berkshelf

今回は次の出力で失敗します。

Building native extensions.  This could take a while...
Fetching: dep_selector-1.0.3.gem (100%)
Building native extensions.  This could take a while...
ERROR:  Error installing berkshelf:
    ERROR: Failed to build gem native extension.

        /opt/chef/embedded/bin/ruby extconf.rb
checking for main() in -lgecodesupport... yes
checking for main() in -lgecodesupport... yes
checking for main() in -lgecodekernel... yes
checking for main() in -lgecodeint... yes
checking for main() in -lgecodeminimodel... yes
checking for main() in -lgecodesearch... yes
creating Makefile

make
compiling define_dummy_init.cxx
make: g++: Command not found
make: *** [define_dummy_init.o] Error 127


Gem files will remain installed in /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/dep_selector-1.0.3 for inspection.
Results logged to /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/dep_selector-1.0.3/ext/dep_gecode/gem_make.out

インストールされた c++ コンパイラ。

# yum install gcc-c++

これで成功するはずです。

 env USE_SYSTEM_GECODE=1 /opt/chef/embedded/bin/gem install berkshelf
Building native extensions.  This could take a while...
Fetching: solve-1.2.1.gem (100%)
Fetching: thor-0.19.1.gem (100%)
Fetching: sawyer-0.5.5.gem (100%)
Fetching: octokit-3.5.2.gem (100%)
Fetching: berkshelf-3.2.0.gem (100%)
Successfully installed dep_selector-1.0.3
Successfully installed solve-1.2.1
Successfully installed thor-0.19.1
Successfully installed sawyer-0.5.5
Successfully installed octokit-3.5.2
Successfully installed berkshelf-3.2.0
6 gems installed
Installing ri documentation for dep_selector-1.0.3...
Installing ri documentation for solve-1.2.1...
Installing ri documentation for thor-0.19.1...
Installing ri documentation for sawyer-0.5.5...
Installing ri documentation for octokit-3.5.2...
unable to convert "\xE2" to UTF-8 in conversion from ASCII-8BIT to UTF-8 to US-ASCII for lib/octokit/client/stats.rb, skipping
unable to convert "\xE2" to UTF-8 in conversion from ASCII-8BIT to UTF-8 to US-ASCII for lib/octokit/client/contents.rb, skipping
unable to convert "\xE2" to UTF-8 in conversion from ASCII-8BIT to UTF-8 to US-ASCII for lib/octokit/client/repositories.rb, skipping
unable to convert "\xE2" to UTF-8 in conversion from ASCII-8BIT to UTF-8 to US-ASCII for lib/octokit/client/users.rb, skipping
unable to convert "\xE2" to UTF-8 in conversion from ASCII-8BIT to UTF-8 to US-ASCII for lib/octokit/client/gists.rb, skipping
Installing ri documentation for berkshelf-3.2.0...
Installing RDoc documentation for dep_selector-1.0.3...
Installing RDoc documentation for solve-1.2.1...
Installing RDoc documentation for thor-0.19.1...
Installing RDoc documentation for sawyer-0.5.5...
Installing RDoc documentation for octokit-3.5.2...
unable to convert "\xE2" to UTF-8 in conversion from ASCII-8BIT to UTF-8 to US-ASCII for lib/octokit/client/stats.rb, skipping
unable to convert "\xE2" to UTF-8 in conversion from ASCII-8BIT to UTF-8 to US-ASCII for lib/octokit/client/contents.rb, skipping
unable to convert "\xE2" to UTF-8 in conversion from ASCII-8BIT to UTF-8 to US-ASCII for lib/octokit/client/repositories.rb, skipping
unable to convert "\xE2" to UTF-8 in conversion from ASCII-8BIT to UTF-8 to US-ASCII for lib/octokit/client/users.rb, skipping
unable to convert "\xE2" to UTF-8 in conversion from ASCII-8BIT to UTF-8 to US-ASCII for lib/octokit/client/gists.rb, skipping
Installing RDoc documentation for berkshelf-3.2.0...
于 2014-11-13T15:45:08.977 に答える
1

これは古い質問ですが、Google 検索で何度も出てきたので、答えを残しておくべきだと思いました。

RAM を 3GB 以上に増やしてみてください。

私は 512MB の仮想システムで実行していて、spiceweasel をビルドしている間、まったく同じ場所で RAM が不足し続けていました。RAM を 3GB (1.5GB では不十分) に増やすと、問題が解決しました。問題が解決することを願っています。

于 2015-08-21T13:15:08.720 に答える