简体   繁体   English

无法在 Mountain Lion 10.8.2 上安装 Ruby

[英]Can't install Ruby on Mountain Lion 10.8.2

I am running Mountain Lion v. 10.8.2 on my mac and Xcode 4.5.2我在我的 Mac 和 Xcode 4.5.2 上运行 Mountain Lion v. 10.8.2

The version of ruby I am running is the default version 1.8.7.我运行的 ruby​​ 版本是默认版本 1.8.7。 I want to upgrade to 1.9.3 but it's not working.我想升级到 1.9.3 但它不起作用。

I installed the gcc compiler:我安装了 gcc 编译器:

$ gcc --version 

i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.11.00)
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

$ git --version
git version 1.7.8

$ rvm --version
rvm 1.17.0 (stable) by Wayne E. Seguin <wayneeseguin@gmail.com>, Michal Papis <mpapis@gmail.com> [https://rvm.io/]

Then I tried to install Ruby 1.9.3 with the following command line:然后我尝试使用以下命令行安装 Ruby 1.9.3:

$ rvm install 1.9.3

The output is this:输出是这样的:

No binary rubies available for: downloads/ruby-1.9.3-p327.
Continuing with compilation. Please read 'rvm mount' to get more information on binary rubies.
Installing Ruby from source to: /Users/eduardo/.rvm/rubies/ruby-1.9.3-p327, this may take a while depending on your cpu(s)...

ruby-1.9.3-p327 - #downloading ruby-1.9.3-p327, this may take a while depending on your connection...

ruby-1.9.3-p327 - #extracted to /Users/eduardo/.rvm/src/ruby-1.9.3-p327 (already extracted)

ruby-1.9.3-p327 - #configuring

ruby-1.9.3-p327 - #compiling

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

My make.log looks like this on the last couple lines:我的 make.log 在最后几行看起来像这样:

collect2: ld returned 1 exit status
make[2]: *** [../../.ext/x86_64-darwin12.2.0/tcltklib.bundle] Error 1
make[1]: *** [ext/tk/all] Error 2
make: *** [build-ext] Error 2

Any help on this please?请对此有任何帮助吗? I am lost on how to fix this issue.我不知道如何解决这个问题。

我今天拿到了我的 macbook pro 并使用本教程像魅力一样安装了 ruby​​: https : //gist.github.com/3237860

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

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