通过rbenv在Yosemite上安装Ruby 2.3.0时出错

时间:2016-04-27 01:26:41

标签: ruby-on-rails ruby environment yosemite

出于某种原因,我无法通过RBENV安装ruby 2.3.0。我让它与RVM合作。如果我需要提供更多信息,请告诉我。

这是我得到的错误:

Downloading ruby-2.3.0.tar.bz2...
-> https://cache.ruby-lang.org/pub/ruby/2.3/ruby-2.3.0.tar.bz2
Installing ruby-2.3.0...

BUILD FAILED (OS X 10.10.5 using ruby-build 20160426)

Inspect or clean up the working tree at /tmp/ruby-build.20160426211028.6622
Results logged to /tmp/ruby-build.20160426211028.6622.log

Last 10 log lines:
config.guess already exists
config.sub already exists
checking build system type... x86_64-apple-darwin14.5.0
checking host system type... x86_64-apple-darwin14.5.0
checking target system type... x86_64-apple-darwin14.5.0
checking whether the C compiler works... no
configure: error: in `/tmp/ruby-build.20160426211028.6622/ruby-2.3.0':
configure: error: C compiler cannot create executables
See `config.log' for more details
make: *** No targets specified and no makefile found.  Stop.

1 个答案:

答案 0 :(得分:0)

您的系统具有过于严格的安全策略,因此为rbenv添加sudo以便能够添加执行。所以你会喜欢这样的东西:

sudo rbenv install 2.3.0
相关问题