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/ruby-1.9.3-p392@rails3.2.8/gems/unf_ext-0.0.6 for inspection.
Results logged to /Users/ryan007/.rvm/gems/ruby-1.9.3-p392@rails3.2.8/gems/unf_ext-0.0.6/ext/unf_ext/gem_make.out
4

1 回答 1

4

我上周日将我的 mac os 更新到 10.9,但我忘记了命令行工具。当我检查我的xcode时,我没有找到“命令行工具”。最后,有人告诉我“运行xcode-select --install”。然后我和他一起,它工作了。我安装了“命令行工具”,一切顺利。希望我的回答可以帮助你

于 2013-10-29T12:37:41.700 回答