rvm install ruby-1.8.7-p334 给出错误“您传递了 --clang 选项,但 clang 不在您的路径中”
尝试在 Mac OS X 10.5.8 上使用 RVM。
> rvm install ruby-1.8.7-p334
ERROR:
You passed the --clang option and clang is not in your path.
Please try again or do not use --clang.
我不知道这个错误是什么;查看 RVM 脚本毫无结果。谷歌没有找到这个错误字符串。 1.8.7 位于“rvm 已知列表”中。
有人以前见过这个吗?
Attempting to use RVM on a Mac OS X 10.5.8.
> rvm install ruby-1.8.7-p334
ERROR:
You passed the --clang option and clang is not in your path.
Please try again or do not use --clang.
I have little idea what this error is about; looking in the RVM script leads nowhere. No luck on google finding this error string. 1.8.7 is in "rvm list known".
Anyone seen this before?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
我不知道解决方案,但这似乎是一个全新的问题,最近也在邮件列表上报告:
http://groups.google.com/group/rubyversionmanager/browse_thread/thread/228d9cd4cf250f68/ec09c7051c8b6e37?show_docid=ec09c7051c8b6e37
您可以通过安装 clang 来解决此问题:
但是,注释中没有提到 clang 是依赖项,因此这可能是错误的结果。
I don't know the solution, but it appears to be a brand new problem that was recently reported on the mailing list as well:
http://groups.google.com/group/rubyversionmanager/browse_thread/thread/228d9cd4cf250f68/ec09c7051c8b6e37?show_docid=ec09c7051c8b6e37
You can work around it by installing clang:
But, the notes mention nothing about clang being a dependency, and so this may be a result of a bug.
所以,这绝对是最新版本中的一个错误。我的建议(特别是因为您没有使用 Edge Ruby)是恢复到旧版本。
接下来,使用以下命令通过特定的源版本进行安装:
注意,我选择了 v1.6.0(目前是 1.6.3)。我遇到了类似的问题,这为我解决了......
So, this is definitely a bug in the latest release. My advice (especially since you're not using edge Ruby) is to revert to an old version.
Next, use the following command to install via a specific source version:
Note, I've chosen v1.6.0 (it's currently 1.6.3). I was running into a similar problem, and this fixed it for me...
如果您谈论的是版本 1.6.3,我遇到了同样的问题,并通过在 .rvm/scripts/selector 中注释第 506 行并说 __rvm_default_flags 来安装 ruby 1.9.2
此函数似乎设置了与 clang 相关的错误默认值
In case you're talking about version 1.6.3, I'm experiencing the same problem and got it to install ruby 1.9.2 by commenting line 506 in .rvm/scripts/selector saying __rvm_default_flags
This function seems to set faulty clang-related defaults
我相信问题是 此提交,特别是对
.rvm/ 的更改脚本/env
。编辑
.rvm/scripts/manage
是解决该问题的一种方法(请参阅 flitzwald 的答案另一种方法):(当您在
.rvm/scripts/cli
中调用时,$rvm_clang_flag
设置为 1。现在错误地触发了错误,因为标志的默认设置和标志的测试不匹配。)编辑:只是一个后续注释。这是一个错误;它已修复。如果您通过 Google 来到这里,
rvm get head && rvm reload
一切都会恢复正常。I believe the problem is this commit, specifically the changes to
.rvm/scripts/env
.Editing
.rvm/scripts/manage
is one way to fix the problem (see flitzwald's answer for another way to do it):(
$rvm_clang_flag
is set to 1 when you call for it in.rvm/scripts/cli
. The error is being falsely tripped now because the flag's default settings and the test for the flag don't match up.)Edit: Just a follow-up note. It was a bug; it's been fixed. If you come by here via Google,
rvm get head && rvm reload
and all should be well again.刚刚尝试了这个 - 问题已经解决了...但是 - 我认为你的意思是编辑脚本/管理,而不是脚本/env ;)
Just tried this - and it's sorted that issue out... BUT - you meant edit scripts/manage, not scripts/env I think ;)