【问题标题】:Error installing Ruby 2.3.0 on Yosemite via rbenv通过 rbenv 在 Yosemite 上安装 Ruby 2.3.0 时出错
【发布时间】:2016-08-21 02:16:54
【问题描述】:

由于某种原因,我无法通过 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.

【问题讨论】:

  • 您安装了 OSX 构建工具吗?
  • 您是否在尝试使用 rvm 时卸载 rbenv,反之亦然?如果不是,您应该这样做,因为这些工具相互不兼容。
  • @MarsAtomic 是的,在我决定使用 rvm 之前,我只有 rbenv。现在我两者都有,而且 rvm 工作正常。我想知道为什么 rbenv 根本不起作用。感谢您的评论。
  • @AnthonyE 是的,我愿意。它是在我安装 Homebrew 时安装的。

标签: ruby-on-rails ruby environment osx-yosemite


【解决方案1】:

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

sudo rbenv install 2.3.0

【讨论】:

    猜你喜欢
    • 2014-12-12
    • 2022-01-17
    • 1970-01-01
    • 2013-01-18
    • 2016-07-29
    • 1970-01-01
    • 2015-10-04
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多