2014-10-18 66 views
1

我升級到OS X優勝美地,gem install停止工作。升級到OS X後,gem install停止工作10.10優勝美地

當我運行它,我看到這個又大又醜的錯誤:

$ gem install rdiscount 
Building native extensions. This could take a while... 
ERROR: Error installing rdiscount: 
    ERROR: Failed to build gem native extension. 

    ruby -r ./siteconf.rb extconf.rb 
checking for random()... *** 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=ruby 
    --with-rdiscount-dir 
    --without-rdiscount-dir 
    --with-rdiscount-include 
    --without-rdiscount-include=${rdiscount-dir}/include 
    --with-rdiscount-lib 
    --without-rdiscount-lib=${rdiscount-dir}/ 
mkmf.rb:434:in `try_do': The compiler failed to generate an executable file. (RuntimeError) 
You have to install development tools first. 
    from mkmf.rb:513:in `block in try_link0' 
    from tmpdir.rb:88:in `mktmpdir' 
    from mkmf.rb:510:in `try_link0' 
    from mkmf.rb:534:in `try_link' 
    from mkmf.rb:720:in `try_func' 
    from mkmf.rb:1004:in `block in have_func' 
    from mkmf.rb:895:in `block in checking_for' 
    from mkmf.rb:340:in `block (2 levels) in postpone' 
    from mkmf.rb:310:in `open' 
    from mkmf.rb:340:in `block in postpone' 
    from mkmf.rb:310:in `open' 
    from mkmf.rb:336:in `postpone' 
    from mkmf.rb:894:in `checking_for' 
    from mkmf.rb:1003:in `have_func' 
    from extconf.rb:5:in `<main>' 

extconf failed, exit code 1 

Gem files will remain installed in rdiscount-2.1.7.1 for inspection. 
Results logged to /gem_make.out 

回答

1

當您升級到優勝美地的Xcode命令行工具將不可用。

運行此命令,然後按照屏幕上的說明進行操作。

$ xcode-select --install 
xcode-select: note: install requested for command line developer tools 
相關問題