Attempting to use RVM on a Mac OS X 10.5.8.
试图在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.
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".
我不知道这个误差是什么;查看RVM脚本不会有任何结果。不幸的是谷歌找到了这个错误字符串。1.8.7在“rvm已知列表”中。
Anyone seen this before?
有人见过吗?
5 个解决方案
#1
1
I believe the problem is this commit, specifically the changes to .rvm/scripts/env
.
我认为问题在于提交,特别是对.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/scripts/manage是一种解决问题的方法(参见flitzwald的另一种解决方法):
20 __rvm_check_for_clang()
21 {
22 if [[ "${rvm_clang_flag}" -eq 1 ]] && ! command -v clang >/dev/null ; then
23 rvm_error "\nYou passed the --clang option and clang is not in your path. \nPlease try again or do not use --clang.\n"
24 return 1
25 fi
26 }
($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.)
($rvm_clang_flag在.rvm/scripts/cli中调用时设置为1。错误现在被错误地触发,因为标志的默认设置和标志的测试不匹配。
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.
编辑:只是一个补充说明。这是一个错误;这是固定的。如果您通过谷歌访问这里,rvm将获得head & rvm重新加载,一切都会恢复正常。
#2
4
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:
你可以通过安装clang来解决这个问题:
sudo apt-get install clang
sudo apt-get安装叮当声
But, the notes mention nothing about clang being a dependency, and so this may be a result of a bug.
但是,注释中没有提到clang是一个依赖项,因此这可能是一个bug的结果。
#3
4
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.
所以,这肯定是最新版本中的一个bug。我的建议(特别是由于您没有使用edge Ruby)是恢复到旧版本。
rvm implode
yes
Next, use the following command to install via a specific source version:
接下来,使用以下命令通过特定的源版本进行安装:
curl -s https://rvm.beginrescueend.com/install/rvm -o rvm-installer ; chmod +x rvm-installer ; ./rvm-installer 1.6.0
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...
注意,我选择了v1.6.0(目前是1.6.3)。我遇到了一个类似的问题,这个问题帮我解决了……
#4
3
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
如果您正在讨论1.6.3版本,我也遇到了同样的问题,我让它通过在.rvm/scripts/selector中注释行506来安装ruby 1.9.2,说__rvm_default_flags
This function seems to set faulty clang-related defaults
这个函数似乎设置了错误的叮当相关的默认值
#5
1
Just tried this - and it's sorted that issue out... BUT - you meant edit scripts/manage, not scripts/env I think ;)
我试过了,这个问题已经解决了……但是——你的意思是编辑脚本/管理,而不是脚本/env;
#1
1
I believe the problem is this commit, specifically the changes to .rvm/scripts/env
.
我认为问题在于提交,特别是对.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/scripts/manage是一种解决问题的方法(参见flitzwald的另一种解决方法):
20 __rvm_check_for_clang()
21 {
22 if [[ "${rvm_clang_flag}" -eq 1 ]] && ! command -v clang >/dev/null ; then
23 rvm_error "\nYou passed the --clang option and clang is not in your path. \nPlease try again or do not use --clang.\n"
24 return 1
25 fi
26 }
($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.)
($rvm_clang_flag在.rvm/scripts/cli中调用时设置为1。错误现在被错误地触发,因为标志的默认设置和标志的测试不匹配。
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.
编辑:只是一个补充说明。这是一个错误;这是固定的。如果您通过谷歌访问这里,rvm将获得head & rvm重新加载,一切都会恢复正常。
#2
4
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:
你可以通过安装clang来解决这个问题:
sudo apt-get install clang
sudo apt-get安装叮当声
But, the notes mention nothing about clang being a dependency, and so this may be a result of a bug.
但是,注释中没有提到clang是一个依赖项,因此这可能是一个bug的结果。
#3
4
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.
所以,这肯定是最新版本中的一个bug。我的建议(特别是由于您没有使用edge Ruby)是恢复到旧版本。
rvm implode
yes
Next, use the following command to install via a specific source version:
接下来,使用以下命令通过特定的源版本进行安装:
curl -s https://rvm.beginrescueend.com/install/rvm -o rvm-installer ; chmod +x rvm-installer ; ./rvm-installer 1.6.0
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...
注意,我选择了v1.6.0(目前是1.6.3)。我遇到了一个类似的问题,这个问题帮我解决了……
#4
3
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
如果您正在讨论1.6.3版本,我也遇到了同样的问题,我让它通过在.rvm/scripts/selector中注释行506来安装ruby 1.9.2,说__rvm_default_flags
This function seems to set faulty clang-related defaults
这个函数似乎设置了错误的叮当相关的默认值
#5
1
Just tried this - and it's sorted that issue out... BUT - you meant edit scripts/manage, not scripts/env I think ;)
我试过了,这个问题已经解决了……但是——你的意思是编辑脚本/管理,而不是脚本/env;