2012-02-12 420 views
0

我試圖通過RVM安裝Ruby 1.9.3 v,當我運行命令我得到這個錯誤:RVM安裝錯誤,無法安裝最新版本的

rvm install 1.9.3 

錯誤:

ruby-1.9.3-p0 - #extracting ruby-1.9.3-p0 to /Users/shaboy/.rvm/src/ruby-1.9.3-p0 
ruby-1.9.3-p0 - #extracted to /Users/shaboy/.rvm/src/ruby-1.9.3-p0 
ruby-1.9.3-p0 - #configuring 
Error running ' ./configure --prefix=/Users/shaboy/.rvm/rubies/ruby-1.9.3-p0 --enable-shared --disable-   
install-doc --with-libyaml --with-opt-dir=/Users/shaboy/.rvm/usr ', 
please read /Users/shaboy/.rvm/log/ruby-1.9.3-p0/configure.log 
There has been an error while running configure. Halting the installation. 

configure.log

[2012-02-12 16:14:10] ./configure --prefix=/Users/shaboy/.rvm/rubies/ruby-1.9.3-p0 --enable-shared --  
disable-install-doc --with-libyaml --with-opt-dir=/Users/shaboy/.rvm/usr 
configure: WARNING: unrecognized options: --with-libyaml 
checking build system type... x86_64-apple-darwin11.2.0 
checking host system type... x86_64-apple-darwin11.2.0 
checking target system type... x86_64-apple-darwin11.2.0 
checking whether the C compiler works... no 
configure: error: in `/Users/shaboy/.rvm/src/ruby-1.9.3-p0': 
configure: error: C compiler cannot create executables 
See `config.log' for more details 
+0

你能告訴我們日誌的內容嗎? – Uko 2012-02-12 21:23:39

+0

'/ Users/shaboy/.rvm/log/ruby​​-1.9.3-p0/configure.log'中有什麼? – Telemachus 2012-02-12 21:24:07

+0

剛剛添加的內容 – 2012-02-12 21:34:46

回答

0

有在那些日子裏,紅寶石沒有穩定的版本,但它是stable.Although它提供了一些

warrnings尚未如此請你應該使用紅寶石1.9.2這是穩定的。

0

我建議你安裝了XCode 4.1,並設置環境變量export CC=/usr/bin/gcc-4.2。如果你想從1.8.7到1.9.3安裝所有的Ruby版本,並且沒有寶石問題,這是最好的解決方案。

clang XCode> 4.1或osx-gcc-installer的解決方案允許您只構建ruby 1.9.3,並且會失敗構建ruby-debugger gems,它也會導致大量隨機與mysql2 gems一起崩潰。