我正在try 安装Ruby 1.9.3,但遇到了问题.

rvm install 1.9.3

输出显示:

ERROR: Error running ' ./configure....

日志(log)上写着:

configure: WARNING: unrecognized options: --with-libyaml-dir 
checking build system type... x86_64-apple-darwin11.2.0 
checking host system type... x86_64-apple-darwin11.2.0 
checking target system type...x86_64-apple-darwin11.2.0 
checking whether the C compiler works... no
configure: error: in `/Users/myuser/.rvm/src/ruby-1.9.3-p0':
configure: error: C compiler cannot create executables See `config.log' for more details

我从应用store 下载并安装了新的XCode.

推荐答案

try 使用clang编译器而不是默认编译器:

rvm install 1.9.3 --with-gcc=clang

Ruby相关问答推荐

Ruby 3 从多个预定纤程中收集结果

判断数组中的字符串是否包含另一个数组中的子字符串

这是 ruby​​ Regexp 中的错误吗?如何在不使用超时的情况下防止正则表达式匹配中的无限循环?

是否有类似于 Ruby 的 Sinatra 的 .NET 框架?

RSpec 模拟对象示例

Ruby检测方法

为什么 Matz Select 在 Ruby 中默认使字符串可变?

来自 Linux 上的命令队列的并行处理(bash、python、ruby ......随便)

Ruby 中的p是什么?

我不明白Ruby本地范围(local scope)

如何删除Ruby中数组中满足条件的所有元素?

在Ruby中实现平等的正确方法是什么

对哈希中数组的值求和

如何理解 strptime 与 strftime

在 Ruby 脚本中解析命令行参数

Ruby总是Round Up

常见的 Ruby 习语

在 Jekyll 中使用 Live Reload

将字符串与Ruby中的数字连接起来

让 sidekiq 立即执行作业(job)