1

我在我的 Mac 和 Xcode 4.5.2 上运行 Mountain Lion v. 10.8.2

我运行的 ruby​​ 版本是默认版本 1.8.7。我想升级到 1.9.3 但它不起作用。

我安装了 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/]

然后我尝试使用以下命令行安装 Ruby 1.9.3:

$ rvm install 1.9.3

输出是这样的:

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.

我的 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

请问有什么帮助吗?我不知道如何解决这个问题。

4

1 回答 1

2

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

于 2012-11-28T18:52:46.757 回答