在 Mountain Lion (10.8) 上安装 Ruby 1.8.7 [英] Getting Ruby 1.8.7 installed on Mountain Lion (10.8)

查看:59
本文介绍了在 Mountain Lion (10.8) 上安装 Ruby 1.8.7的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在全新安装的 Mountain Lion 上安装 Ruby 1.8.7 时遇到了很多麻烦.我在 Stack Overflow 上环顾四周,没有看到任何专门解决此问题的内容,希望之前有人可能遇到过这种情况.

I'm having a lot of trouble getting Ruby 1.8.7 installed on my clean install of Mountain Lion. I've looked around on Stack Overflow and don't see anything that specifically addresses this issue and hope that someone might have encountered this before.

我使用的是可以通过 Xcode 下载的命令行工具

我在通过 RVM 和 HomeBrew 安装 Ruby 1.9.3 时没有遇到任何问题.当我尝试安装 1.8.7 时,我在尝试编译后收到以下消息:

I haven't had any problems installing Ruby 1.9.3 via RVM and HomeBrew. When I try to install 1.8.7 I get the following message after it tries to compile:

我先运行了命令

rvm install 1.8.7

这给了我这个错误

The provided compiler '/usr/bin/gcc' is LLVM based, it is not yet fully supported by ruby and gems, please read `rvm requirements`.

在挖掘了一下之后我尝试了

After digging around a bit I tried

rvm install 1.8.7 --with-gcc=clang

Error running 'make ', please read /Users/paulzaich/.rvm/log/ruby-1.8.7-p370/make.log
There has been an error while running make. Halting the installation.
Ruby 'ruby-1.8.7-p370' was built using clang - but it's not (fully) supported, expect errors.
Please be aware that you just installed a ruby that requires        2 patches just to be compiled on up to date linux system.
This may have known and unaccounted for security vulnerabilities.
Please consider upgrading to Ruby 1.9.3-194 which will have all of the latest security patches.

此时我进行了更多搜索,发现了一些关于需要编译我自己的 readline 的信息.RVM 未安装Snow Leopard 上的 Ruby 1.9.2:'运行'make'时出错

At this point I did some more searching and found something about needing compile my own readline. RVM Does Not Install Ruby 1.9.2 on Snow Leopard: 'Error running 'make '

不幸的是,这似乎破坏了我的整个 rvm 安装,包括 1.9.3.我尝试重新安装 1.9.3,但遇到了与 1.8.7 相同的错误.我此时完全删除了 RVM 并重新安装.再次安装 1.9.3 没有问题.

This unfortunately seemed to corrupt my entire rvm install including 1.9.3. I tried to reinstall 1.9.3 and got the same errors I as I was getting with 1.8.7. I completely deleted RVM at this point and reinstalled. Had no problem installing 1.9.3 again.

我还尝试根据这篇文章更新所有版本的 rvmMountain Lion 的 RVM 问题.那里也没有运气.

I also tried updating all versions of rvm based off of this post RVM issue with Mountain Lion. No luck there either.

更新:我还尝试将 本演练用于 REE 1.8.7 其中推荐安装 gcc-4.2.不幸的是没有运气.

Update: I also tried using this walkthrough for REE 1.8.7 which recommended installing gcc-4.2. No luck unfortunately.

更新 2:我参考了 rvm 要求并安装了以下软件包

Update 2: I reference rvm requirements and installed the following packages

brew update
brew tap homebrew/dupes 
brew install autoconf automake apple-gcc42 
rvm pkg install openssl

到目前为止一切顺利.然后我参考了这篇文章 需要参考GCC 编译器.我确定引用的链接可能不正确,因为我使用的是自制软件?我在我的 Cellar 文件夹中找到了编译器并使用了以下命令

So far so good. Then I referenced this post on needing to reference the GCC compiler. I determined that the links referenced might not be correct because I'm using homebrew? I found the compiler in my Cellar folder and used the following command

CC=/usr/local/Cellar/apple-gcc42/4.2.1-5666.3/bin/gcc-4.2 rvm install 1.8.7

没有运气.与以前相同的错误消息.

No luck. Same error messages as before.

推荐答案

我刚刚想通了!请在 SO 上参考这个问题

I just figured it out! Please reference this question on SO

rvm 无法再在 Mac OS X Mountain Lion 上安装 1.8.7-p352

rvm reinstall 1.8.7 --without-tcl --without-tk

或者,如果您有 Homebrew,请尝试此安装顺序.

Alternatively, try this installation order if you have Homebrew.

brew install tcl-tk

rvm reinstall 1.8.7

这篇关于在 Mountain Lion (10.8) 上安装 Ruby 1.8.7的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆