[英]Update ruby version on MAC
I'm trying to update ma ruby version.我正在尝试更新 ma ruby 版本。 I'm with ruby 1.8.7 and I would like to install 2.1.0.
我使用 ruby 1.8.7,我想安装 2.1.0。 I just installed
rvm
, rbenv
, brew
and gem.我刚刚安装了
rvm
、 rbenv
、 brew
和 gem。
But when I try to do但是当我尝试做
$ rbenv install 2.1.0.
I get an error about clang.我收到有关 clang 的错误消息。 I don't get the point between clang and ruby
我不明白 clang 和 ruby 之间的关系
Could you please help me?请你帮助我好吗?
Error:错误:
$ rbenv install 2.1.0
Downloading ruby-2.1.0.tar.gz...
Installing ruby-2.1.0...
BUILD FAILED
...
Last 10 log lines:
...
checking build system type... x86_64-apple-darwin12.3.0
checking host system type... x86_64-apple-darwin12.3.0
checking target system type... x86_64-apple-darwin12.3.0
checking for gcc-4.2... no
checking for clang... no
checking for gcc... no
checking for cc... no
./configure: line 3390: -E: command not found
configure: error: clang version 3.0 or later is required
You need to install the Developer Tools command-line tools in order to build Ruby.您需要安装 Developer Tools 命令行工具才能构建 Ruby。 As one option, you can install Xcode from the App Store, and Xcode will let you install the command line tools if they aren't automatically installed with your version.
作为一种选择,您可以从 App Store 安装 Xcode,如果命令行工具没有随您的版本自动安装,Xcode 将允许您安装它们。
You can install developer command line tools without installing Xcode.您可以在不安装 Xcode 的情况下安装开发人员命令行工具。 Just type the following in the terminal:
只需在终端中输入以下内容:
xcode-select --install
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.