简体   繁体   中英

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

The version of ruby I am running is the default version 1.8.7. I want to upgrade to 1.9.3 but it's not working.

I installed the gcc compiler:

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

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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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