无法在 OSX Lion 上使用 RVM 安装 Ruby Enterprise Edition
这是我到目前为止所做的。
- 全新安装 OS X Lion
- 从 App Store 下载并安装最新版本的 Xcode。
- 安装了 Git
- 安装了 Homebrew
- 安装了 RVM
我现在尝试使用 rvm install ree
为项目安装 Ruby Enterprise Edition 并收到以下错误:
$ rvm install ree
ree-1.8.7-2011.03 - #installing
ERROR: Error running './installer -a /Users/FaraazKhan/.rvm/rubies/ree-1.8.7-2011.03
--no-tcmalloc --dont-install-useful-gems ', please read
/Users/FaraazKhan/.rvm/log/ree-1.8.7-2011.03/install.log
ERROR: There has been an error while trying to run the ree installer. Halting
the installation.
我已经尝试过 CC=/usr/bin/gcc -4.2 rvm install ree
并得到相同的结果。
Here is what I have done so far.
- Clean install of OS X Lion
- Downloaded and installed latest version of Xcode from the App Store.
- Installed Git
- Installed Homebrew
- Installed RVM
I am now trying to install Ruby Enterprise Edition for a project with rvm install ree
and receive the following error:
$ rvm install ree
ree-1.8.7-2011.03 - #installing
ERROR: Error running './installer -a /Users/FaraazKhan/.rvm/rubies/ree-1.8.7-2011.03
--no-tcmalloc --dont-install-useful-gems ', please read
/Users/FaraazKhan/.rvm/log/ree-1.8.7-2011.03/install.log
ERROR: There has been an error while trying to run the ree installer. Halting
the installation.
I have already tried CC=/usr/bin/gcc-4.2 rvm install ree
and with the same result.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(8)
我刚才能够重复您的错误。这为我解决了这个问题:
$ rvm remove ree
$ 导出 CC=/usr/bin/gcc-4.2
$ rvm install --force ree
I was able to duplicate your error, just now. This solved it for me:
$ rvm remove ree
$ export CC=/usr/bin/gcc-4.2
$ rvm install --force ree
使用 MacPorts,您可以在 OS X Lion 中为本地用户安装 Ruby Enterprise Edition 以及 Ruby 1.9.2,同时使用“Apple 版本的 gcc 4.2”安装 Xcode 4.2。
执行以下命令:
然后
或
可选
或
我希望这有帮助。
-乔
Using MacPorts you can install Ruby Enterprise Edition, as well as Ruby 1.9.2 for the local user in OS X Lion while having Xcode 4.2 installed by using "Apple's version of gcc 4.2."
Execute the following commands:
then
or
optionally
or
I hope this helps.
-Joe
无需安装 MacPorts 或降级到 4.1 即可获取 GCC,我使用了 https:// github.com/kennethreitz/osx-gcc-installer 已经安装了 xCode 4.2,并且安装 1.9.2-head 没有问题1.9.2-p290。
No need to install MacPorts or downgrade to 4.1 to get GCC, I used the installer package at https://github.com/kennethreitz/osx-gcc-installer with xCode 4.2 already installed, and had no problem installing 1.9.2-head and 1.9.2-p290.
我做了类似于 jbg 建议的事情。只是我没有使用MacPorts。我刚刚在此处使用了 Lion 的最新 GCC 包。
这是在花了大约一天半的时间尝试所有其他建议、降级到 Xcode 4.1 等之后无济于事。
顺便说一句,苹果网站上 Xcode 4.1 的直接链接给了我一个无效的校验和错误,我下载了 3 次。我看到其他人也有同样问题的 Twitter 帖子。
I did something similar to what jbg advised. Only I didn't use MacPorts. I just used the latest GCC package for Lion here.
This was after spending about a day and a half trying all of the other suggestions, downgrading to Xcode 4.1, etc. to no avail.
By the way, the direct link to Xcode 4.1 at Apple's site gave me an invalid checksum error, all three times I downloaded it. I saw a Twitter post from someone else who had the same problem.
冒着冗余的风险,我也会发布我的答案,因为我尝试了此页面(以及许多其他页面)上的所有内容,并最终得到了其中一些似乎最有可能起作用的混合体。请注意,其中一些步骤可能不是明确必需的,但它们已经足够了(即,我没有返回并删除可能不必要的步骤来获得最简单的成功路径)。
环境:Mac OS Lion 10.7.3、Homebrew 组件、rvm 1.10.2、ree 1.8.7-2012.01、Xcode 4.2.1(旧版 gcc-4.2 可用)。
步骤:
--with-openssl-dir=$rvm_path/usr \
--with-readline-dir=$rvm_path/usr \
--with-iconv-dir=$rvm_path/usr \
--with-zlib-dir=$rvm_path/usr
我之前尝试过特定于brew的解决方案,但那些对我不起作用。希望这对某人有帮助!
At the risk of redundancy, I'll post my answer as well, since I tried everything on this page (and many others) and ended up with a hybrid of some of them which seemed the most likely to work. Note that some of these steps may not have been explicitly necessary but they were sufficient (i.e., I didn't go back and remove potentially unnecessary steps to get the simplest path to success).
Environment: Mac OS Lion 10.7.3, Homebrew components, rvm 1.10.2, ree 1.8.7-2012.01, Xcode 4.2.1 with legacy gcc-4.2 available.
Steps:
--with-openssl-dir=$rvm_path/usr \
--with-readline-dir=$rvm_path/usr \
--with-iconv-dir=$rvm_path/usr \
--with-zlib-dir=$rvm_path/usr
I had previously tried the brew-specific solutions but those didn't work for me. Hope this helps someone!
请不要将 sudo 与 RVM 一起使用,也不需要使用 rvmsudo,除非升级 RVM 本身。请参阅并阅读https://rvm.io/support/faq/(我需要使用sudo 与 gems? 条目)和 https://rvm.io/support/troubleshooting/ (多用户安装 - 使用sudo 命令条目)
请删除当前安装并重新开始,因为使用 sudo 肯定会弄乱 RVM 的权限结构。请参阅 https://rvm.io/support/troubleshooting/ 的最底部(我如何从我的系统中彻底清除 RVM 的所有痕迹,包括系统范围的安装?
然后再次严格遵循 https://rvm.io/rvm/install/
谢谢。
Please do NOT use sudo with RVM, nor do you need to use rvmsudo EXCEPT for when upgrading RVM itself. Please see and read https://rvm.io/support/faq/ (Do I need to use sudo with gems? entry) and https://rvm.io/support/troubleshooting/ (Multi-User Installs - Using the sudo command entry)
Please remove your current installation and start over as using sudo will definitely mess up the permission structure for RVM. Please see the very bottom of https://rvm.io/support/troubleshooting/ (How do I completely clean out all traces of RVM from my system, including for system wide installs? entry)
Then begin again strictly following the Multi-User installation segment of https://rvm.io/rvm/install/
Thank you.
如果您使用的是 Lion 10.7.2,并且已经安装了 XCode 4.2,则需要将 XCode 降级到 4.1
以下是我的做法(比您想象的要复杂):
卸载 XCode 4.2
$ sudo /Developer/Library/uninstall-devtools --mode=all
从您的
/Applications
目录中删除 XCode 安装程序/Applications
中,/Applications
中运行XCode安装程序,Cheers,
伊恩
If you are on Lion 10.7.2, and have installed XCode 4.2, you need to downgrade XCode to 4.1
Here's how I did it (it was more complicated than you might think):
uninstall XCode 4.2
$ sudo /Developer/Library/uninstall-devtools --mode=all
remove the XCode installer from your
/Applications
directory/Applications
/Applications
Cheers,
Ian
这就是我安装它的方法。可能以前的答案已经解决了您的问题。我的步骤可能会帮助那些和我有同样经历的人。
首先,安装 MacPort 最新版本
结果是:
我也把它放到我的 ~/.rvmrc 下一次
This is how i did to install it. May be previous answers are already solve your problem. My step may be help people who experience same as me.
Frist, Install MacPort latest version
Result is:
I'm also put this to my ~/.rvmrc for next time