2013-10-29 61 views
2
gem install unf_ext -v '0.0.6' 
localhost:workflow_boyun ryan007$ gem install unf_ext -v '0.0.6' 
Building native extensions. This could take a while... 
ERROR: Error installing unf_ext: 
    ERROR: Failed to build gem native extension. 

     /Users/ryan007/.rvm/rubies/ruby-1.9.3-p392/bin/ruby 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 
    --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/ryan007/.rvm/rubies/ruby-1.9.3-p392/bin/ruby 
    --with-stdc++lib 
    --without-stdc++lib 
/Users/ryan007/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/mkmf.rb:381:in `try_do': The compiler failed to generate an executable file. (RuntimeError) 
You have to install development tools first. 
    from /Users/ryan007/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/mkmf.rb:461:in `try_link0' 
    from /Users/ryan007/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/mkmf.rb:476:in `try_link' 
    from /Users/ryan007/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/mkmf.rb:619:in `try_func' 
    from /Users/ryan007/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/mkmf.rb:845:in `block in have_library' 
    from /Users/ryan007/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/mkmf.rb:790:in `block in checking_for' 
    from /Users/ryan007/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/mkmf.rb:284:in `block (2 levels) in postpone' 
    from /Users/ryan007/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/mkmf.rb:254:in `open' 
    from /Users/ryan007/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/mkmf.rb:284:in `block in postpone' 
    from /Users/ryan007/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/mkmf.rb:254:in `open' 
    from /Users/ryan007/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/mkmf.rb:280:in `postpone' 
    from /Users/ryan007/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/mkmf.rb:789:in `checking_for' 
    from /Users/ryan007/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/mkmf.rb:840:in `have_library' 
    from extconf.rb:2:in `<main>' 


Gem files will remain installed in /Users/ryan007/.rvm/gems/[email protected]/gems/unf_ext-0.0.6 for inspection. 
Results logged to /Users/ryan007/.rvm/gems/[email protected]/gems/unf_ext-0.0.6/ext/unf_ext/gem_make.out 

回答

3

我更新我的mac os上週日10.9,但我忘了命令行工具。 當我檢查我的xcode時,我沒有找到「命令行工具」。最後,有人告訴我「運行xcode-select --install」。然後我和他一起工作,它工作。我安裝了「命令行工具」,一切順利.hope我的答案可以幫助你ü

+0

我發現'xcode-select'運行正常,但沒有幫助我的寶石。 (我在OS X 10.9.1中安裝了'debugger' gem,Ruby 1.9.3)。從Apple Developer Tools安裝命令行工具軟件包是很有效的,如[Xcode 4.4及更高版本安裝命令行工具](http://stackoverflow.com/questions/9329243/xcode-4-4-and-later-install-command-line-tools),所以也試試。 –

相關問題