简体   繁体   English

无法在Mac OSX 10.7.5上安装Ruby 1.9.3

[英]Can't install Ruby 1.9.3 on Mac OSX 10.7.5

Yes, I know there's some questions posted regarding issues of installing Ruby 1.9.3 on Lion, mainly because of problems with later versions of Xcode (4.3.2 in my case). 是的,我知道在Lion上安装Ruby 1.9.3的问题已经发布了一些问题,主要是因为Xcode的更高版本存在问题(在我的情况下为4.3.2)。

However, I've tried all there is to try that's posted here on Stack regarding this manner, and nothing helps. 但是,我已经尝试了所有的尝试,就这种方式在Stack上发布,没有任何帮助。 It starts to compile, one minute or two passes and then suddenly halts. 它开始编译,一分钟或两遍,然后突然停止。

As examples I've tried with the following (of course I have GCC installer installed): 作为示例,我尝试了以下(当然我安装了GCC安装程序):

rvm install 1.9.3
rvm install 1.9.3 --with-gcc=clang
rvm install 1.9.3 --with-gcc=gcc-4.2

If running rvm install 1.9.3 the following error shows during the compilation (which halts the installation): 如果运行rvm install 1.9.3,则在编译期间会显示以下错误(停止安装):

Error running 'make', please read /Users/henrikpetersson81/.rvm/log/ruby-1.9.3-p374/make.log
There has been an error while running make. Halting the installation.

Here you can read the log file from the latest build fail: http://jsfiddle.net/hyhrk/ 在这里,您可以阅读最新版本的日志文件失败: http//jsfiddle.net/hyhrk/

Last thing I've tried was to follow the updated guide in this answer . 我试过的最后一件事是按照这个答案中的更新指南。 Same problem. 同样的问题。

What can be the problem here? 这可能是什么问题?

NOTE. 注意。 I've the following installed: 我安装了以下内容:

  1. Ruby 1.8.7 Ruby 1.8.7
  2. Homebrew 0.7.1 自制语0.7.1
  3. RVM 1.17.10 RVM 1.17.10
  4. GCC installer 4.2.1 GCC安装程序4.2.1
  5. Xcode 4.3.2 Xcode 4.3.2
  6. Command Line Tools 命令行工具

RVM has an updated command to install all required libraries: RVM有一个更新的命令来安装所有必需的库:

rvm get head
rvm requirements run

It might ask you for your password (for sudo ). 它可能会要求您输入密码(对于sudo )。

After that run: 之后运行:

rvm install 1.9.3 --with-opt-dir=`brew --prefix readline` --without-tcl --without-tk

Update RVM 1.19+ 更新RVM 1.19+

RVM takes care of it all: RVM负责这一切:

rvm get stable
rvm autolibs homebrew
rvm install 1.9.3

It looks like there are issues with readline. 看起来readline存在问题。 Since you're using Homebrew, you can try this: 既然你正在使用Homebrew,你可以试试这个:

brew install readline
rvm install 1.9.3 --with-readline=`brew --prefix readline`

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM