无法在 OSX Lion 上使用 RVM 安装 Ruby Enterprise Edition

发布于 2024-11-25 13:27:58 字数 724 浏览 5 评论 0原文

这是我到目前为止所做的。

  1. 全新安装 OS X Lion
  2. 从 App Store 下载并安装最新版本的 Xcode。
  3. 安装了 Git
  4. 安装了 Homebrew
  5. 安装了 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.

  1. Clean install of OS X Lion
  2. Downloaded and installed latest version of Xcode from the App Store.
  3. Installed Git
  4. Installed Homebrew
  5. 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(8

忆伤 2024-12-02 13:27:58

我刚才能够重复您的错误。这为我解决了这个问题:

$ 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

倾听心声的旋律 2024-12-02 13:27:58

使用 MacPorts,您可以在 OS X Lion 中为本地用户安装 Ruby Enterprise Edition 以及 Ruby 1.9.2,同时使用“Apple 版本的 gcc 4.2”安装 Xcode 4.2。

先决条件:

  • OS X Lion(在 10.7.2 中测试)
  • Xcode 4.2
  • rvm 1.9.1
  • MacPorts 2.0.3

执行以下命令:

$ sudo port install apple-gcc42

$ 导出 CC=/opt/local/bin/gcc-apple-42

然后

$ rvm 安装 ree

$ rvm 使用 ree

$ rvm 安装 1.9.2

$ rvm 使用 1.9.2

可选

$ rvm 使用 ree --default

$ rvm 使用 1.9.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."

Prerequisites:

  • OS X Lion (tested in 10.7.2)
  • Xcode 4.2
  • rvm 1.9.1
  • MacPorts 2.0.3

Execute the following commands:

$ sudo port install apple-gcc42

$ export CC=/opt/local/bin/gcc-apple-42

then

$ rvm install ree

$ rvm use ree

or

$ rvm install 1.9.2

$ rvm use 1.9.2

optionally

$ rvm use ree --default

or

$ rvm use 1.9.2 --default

I hope this helps.

-Joe

风苍溪 2024-12-02 13:27:58

无需安装 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.

往昔成烟 2024-12-02 13:27:58

我做了类似于 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.

爱给你人给你 2024-12-02 13:27:58

冒着冗余的风险,我也会发布我的答案,因为我尝试了此页面(以及许多其他页面)上的所有内容,并最终得到了其中一些似乎最有可能起作用的混合体。请注意,其中一些步骤可能不是明确必需的,但它们已经足够了(即,我没有返回并删除可能不必要的步骤来获得最简单的成功路径)。

环境:Mac OS Lion 10.7.3、Homebrew 组件、rvm 1.10.2、ree 1.8.7-2012.01、Xcode 4.2.1(旧版 gcc-4.2 可用)。

步骤:

  1. 确保当前有稳定的 Ruby。使用 1.9.2(rvm 使用 1.9.2)作为 1.9.3 是一个潜在的问题。
  2. rm -fr $rvm_path/usr
  3. rvm pkg 安装 ree_dependency
  4. rvm 删除 ree
  5. 导出 CC=/usr/bin/gcc-4.2
  6. rvm 安装 ree \
    --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:

  1. Ensure that a stable Ruby is current. Used 1.9.2 (rvm use 1.9.2) as 1.9.3 was a potential problem.
  2. rm -fr $rvm_path/usr
  3. rvm pkg install ree_dependencies
  4. rvm remove ree
  5. export CC=/usr/bin/gcc-4.2
  6. rvm install ree \
    --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!

誰認得朕 2024-12-02 13:27:58

请不要将 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.

涫野音 2024-12-02 13:27:58

如果您使用的是 Lion 10.7.2,并且已经安装了 XCode 4.2,则需要将 XCode 降级到 4.1

以下是我的做法(比您想象的要复杂):

  • Apple 开发中心(您需要使用开发中心凭据登录)
  • 卸载 XCode 4.2

    $ sudo /Developer/Library/uninstall-devtools --mode=all

  • 从您的 /Applications 目录中删除 XCode 安装程序

  • 运行 XCode你下载的4.1包,这将安装一个新的XCode安装程序到/Applications中,
  • /Applications中运行XCode安装程序,
  • 当它停止时,要求你退出iTunes,你需要退出iTunes,并使用“活动监视器”强制退出 iTunes Helper
  • 等待 XCode 4.1 安装
  • 使用上述步骤安装 ree

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):

  • Download XCode 4.1 from Apple Dev Center (you'll need to login with your dev centre creds)
  • uninstall XCode 4.2

    $ sudo /Developer/Library/uninstall-devtools --mode=all

  • remove the XCode installer from your /Applications directory

  • run the XCode 4.1 package you downloaded, this will install a new XCode installer into /Applications
  • run the XCode installer in /Applications
  • When it stops, asking you to quit iTunes, you need to quit iTunes, and also use Activity Monitor to force quit the iTunes Helper
  • Wait for XCode 4.1 to install
  • Use the steps outlined above to install ree

Cheers,
Ian

骷髅 2024-12-02 13:27:58

这就是我安装它的方法。可能以前的答案已经解决了您的问题。我的步骤可能会帮助那些和我有同样经历的人。

首先,安装 MacPort 最新版本

>rvm uninstall ree
>sudo port install apple-gcc42
>export CC=/opt/local/bin/gcc-apple-4.2
>rvm pkg install zlib openssl readline
>rvm install --force ree

结果是:

IronB:~ ...$ rvm install --force ree
Installing Ruby Enterprise Edition from source to: /Users/.../.rvm/rubies/ree-1.8.7-2011.03
ree-1.8.7-2011.03 - #fetching (ruby-enterprise-1.8.7-2011.03)
ree-1.8.7-2011.03 - #extracting ruby-enterprise-1.8.7-2011.03 to /Users/.../.rvm/src/ree-1.8.7-2011.03
Applying patch 'tcmalloc' (located at /Users/.../.rvm/patches/ree/1.8.7/tcmalloc.patch)
Applying patch 'stdout-rouge-fix' (located at /Users/.../.rvm/patches/ree/1.8.7/stdout-rouge-fix.patch)
Applying patch 'no_sslv2' (located at /Users/.../.rvm/patches/ree/1.8.7/no_sslv2.diff)
ree-1.8.7-2011.03 - #installing 
Removing old Rubygems files...
Installing rubygems-1.8.10 for ree-1.8.7-2011.03 ...
Installation of rubygems completed successfully.
ree-1.8.7-2011.03 - adjusting #shebangs for (gem irb erb ri rdoc testrb rake).
ree-1.8.7-2011.03 - #importing default gemsets (/Users/.../.rvm/gemsets/)

我也把它放到我的 ~/.rvmrc 下一次

 # Make this work with OS X Lion... for now...
 if [[ `uname -v` =~ "Darwin Kernel Version 11" ]] ; then
       export CC=/opt/local/bin/gcc-apple-4.2
 fi

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

>rvm uninstall ree
>sudo port install apple-gcc42
>export CC=/opt/local/bin/gcc-apple-4.2
>rvm pkg install zlib openssl readline
>rvm install --force ree

Result is:

IronB:~ ...$ rvm install --force ree
Installing Ruby Enterprise Edition from source to: /Users/.../.rvm/rubies/ree-1.8.7-2011.03
ree-1.8.7-2011.03 - #fetching (ruby-enterprise-1.8.7-2011.03)
ree-1.8.7-2011.03 - #extracting ruby-enterprise-1.8.7-2011.03 to /Users/.../.rvm/src/ree-1.8.7-2011.03
Applying patch 'tcmalloc' (located at /Users/.../.rvm/patches/ree/1.8.7/tcmalloc.patch)
Applying patch 'stdout-rouge-fix' (located at /Users/.../.rvm/patches/ree/1.8.7/stdout-rouge-fix.patch)
Applying patch 'no_sslv2' (located at /Users/.../.rvm/patches/ree/1.8.7/no_sslv2.diff)
ree-1.8.7-2011.03 - #installing 
Removing old Rubygems files...
Installing rubygems-1.8.10 for ree-1.8.7-2011.03 ...
Installation of rubygems completed successfully.
ree-1.8.7-2011.03 - adjusting #shebangs for (gem irb erb ri rdoc testrb rake).
ree-1.8.7-2011.03 - #importing default gemsets (/Users/.../.rvm/gemsets/)

I'm also put this to my ~/.rvmrc for next time

 # Make this work with OS X Lion... for now...
 if [[ `uname -v` =~ "Darwin Kernel Version 11" ]] ; then
       export CC=/opt/local/bin/gcc-apple-4.2
 fi
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文