我正在尝试通过RVM安装Ruby v 1.9.3,运行命令时出现此错误:
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 :(得分:0)
那些日子里没有稳定版本的红宝石,但是它很稳定。虽然它给了一些
但是,你应该使用稳定的ruby 1.9.2。答案 1 :(得分:0)
它应该适合你:
rvm install 1.9.3 --with-gcc=clang
您可以在此处找到更多选项: Can't install Ruby under Lion with RVM – GCC issues
答案 2 :(得分:0)
我建议您安装XCode 4.1并设置环境变量export CC=/usr/bin/gcc-4.2
。如果你想安装所有版本的ruby从1.8.7到1.9.3并且没有宝石问题,这是最好的解决方案。
clang
解决方案> 4.1或osx-gcc-installer
允许你只构建ruby 1.9.3并且将无法构建ruby-debugger gems,它也会导致许多随机崩溃的mysql2 gems。