2012-11-28 76 views
1

我正在山狮诉10.8.2在我的Mac和Xcode的4.5.2无法在山狮安装Ruby 10.8.2

我运行红宝石的版本是默认版本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 <[email protected]>, Michal Papis <[email protected]> [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 

对此有任何帮助吗?我迷失在如何解决这个问题。

+1

尝试没有TK安装Ruby:'RVM安装1.9.3 --without-tk' – 2012-11-28 18:29:24

+0

尝试卸载Xcode和使用OS X gcc安装程序:https://github.com/kennethreitz/osx-gcc-installer 当我这样做时,我获得了巨大的成功。如果您需要XCode - 比方说开发iOS应用程序 - 在安装红宝石后重新安装它。 –

+0

酷......“rvm install 1.9.3 --without-tk”工作!!!!谢谢 – user1747832

回答

2

我得到了我今天的MacBook Pro和安装喜欢使用本教程魅力红宝石:https://gist.github.com/3237860

+0

伟大的破败,非常简洁! – thatmiddleway

+0

您能否加入 - [聊天](http://chat.stackoverflow.com/rooms/24194/ruby)? –