2012-02-12 175 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一起崩溃。