2015-10-05 89 views
0

我試圖安裝條紋寶石,我得到這個錯誤嘗試添加條紋寶石

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

/Users/Fysh/.rvm/rubies/ruby-2.0.0-p643/bin/ruby -r ./siteconf20151005-1267-af6sn6.rb extconf.rb checking for main() in -lstdc++... * 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=/Users/Fysh/.rvm/rubies/ruby-2.0.0-p643/bin/ruby --with-static-libstdc++ --without-static-libstdc++ --with-stdc++lib --without-stdc++lib /Users/Fysh/.rvm/rubies/ruby-2.0.0-p643/lib/ruby/2.0.0/mkmf.rb:434:in try_do': The compiler failed to generate an executable file. (RuntimeError) You have to install development tools first. from /Users/Fysh/.rvm/rubies/ruby-2.0.0-p643/lib/ruby/2.0.0/mkmf.rb:519:in try_link0' from /Users/Fysh/.rvm/rubies/ruby-2.0.0-p643/lib/ruby/2.0.0/mkmf.rb:534:in try_link' from /Users/Fysh/.rvm/rubies/ruby-2.0.0-p643/lib/ruby/2.0.0/mkmf.rb:714:in try_func' from /Users/Fysh/.rvm/rubies/ruby-2.0.0-p643/lib/ruby/2.0.0/mkmf.rb:944:in block in have_library' from /Users/Fysh/.rvm/rubies/ruby-2.0.0-p643/lib/ruby/2.0.0/mkmf.rb:889:in block in checking_for' from /Users/Fysh/.rvm/rubies/ruby-2.0.0-p643/lib/ruby/2.0.0/mkmf.rb:340:in block (2 levels) in postpone' from /Users/Fysh/.rvm/rubies/ruby-2.0.0-p643/lib/ruby/2.0.0/mkmf.rb:310:in open' from /Users/Fysh/.rvm/rubies/ruby-2.0.0-p643/lib/ruby/2.0.0/mkmf.rb:340:in block in postpone' from /Users/Fysh/.rvm/rubies/ruby-2.0.0-p643/lib/ruby/2.0.0/mkmf.rb:310:in open' from /Users/Fysh/.rvm/rubies/ruby-2.0.0-p643/lib/ruby/2.0.0/mkmf.rb:336:in postpone' from /Users/Fysh/.rvm/rubies/ruby-2.0.0-p643/lib/ruby/2.0.0/mkmf.rb:888:in checking_for' from /Users/Fysh/.rvm/rubies/ruby-2.0.0-p643/lib/ruby/2.0.0/mkmf.rb:939:in have_library' from extconf.rb:6:in '

extconf failed, exit code 1

Gem files will remain installed in /Users/Fysh/.rvm/gems/ruby-2.0.0-p643/gems/unf_ext-0.0.7.1 for inspection. Results logged to /Users/Fysh/.rvm/gems/ruby-2.0.0-p643/extensions/x86_64-darwin-14/2.0.0-static/unf_ext-0.0.7.1/gem_make.out An error occurred while installing unf_ext (0.0.7.1), and Bundler cannot continue. Make sure that gem install unf_ext -v '0.0.7.1' succeeds before bundling.

+0

看起來你有一些資源:http://stackoverflow.com/questions/13835950/bundle-install-failed-due-to-unf-ext-0-0-5-gem 請嘗試這些在 – Stan

+0

之前試試'rvm requirements'。你是否安裝了CommandLine開發工具? –

+0

我試過了,它沒有工作 – Frank

回答

0

解決時,遇到了一個錯誤有一個Xcode更新我更新後,它的工作。

+0

我強烈建議你使用一個工具來幫助你管理你的Ruby,如[rvm](https://rvm.io)或[rbenv ](https://github.com/rbenv/rbenv)。 –