1
我沒有紅寶石通過rvm
在系統上安裝:爲什麼在ubuntu 11.04上使用rvm安裝Ruby 1.9.3時出現錯誤?
~ % rvm list
rvm rubies
我已經在系統上安裝1.8.7:
~ % which ruby
/usr/bin/ruby
~ % ruby -v
ruby 1.8.7 (2010-08-16 patchlevel 302) [i686-linux]
雖然試圖用RVM安裝1.9.3我得到了以下錯誤:
% rvm install 1.9.3
ERROR: Error running ' ./configure
--prefix=/home/omni/.rvm/rubies/ruby-1.9.3-p0 --enable-shared --disable-install-doc --with-gcc=clang --with-gcc=clang --with-gcc=clang --with-gcc=clang --with-gcc=clang --with-libyaml-dir=/home/omni/.rvm/usr ', please read /home/omni/.rvm/log/ruby-1.9.3-p0/configure.log ERROR: There has been an error while running configure. Halting the installation.
configure.log顯示:
[2012-01-13 21:09:17] ./configure
--prefix=/home/omni/.rvm/rubies/ruby-1.9.3-p0 --enable-shared --disable-install-doc --with-gcc=clang --with-gcc=clang --with-gcc=clang --with-gcc=clang --with-gcc=clang --with-libyaml-dir=/home/omni/.rvm/usr
configure: WARNING: unrecognized options: --with-libyaml-dir
checking build system type...
i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking whether the C compiler works... no
configure: error: in
`/home/omni/.rvm/src/ruby-1.9.3-p0': configure: error: C compiler
cannot create executables See `config.log' for more details
我試着用--with-gcc=clang
標誌運行:
~ % rvm install 1.9.3 --with-gcc=clang
ERROR: Error running '
./configure --prefix=/home/omni/.rvm/rubies/ruby-1.9.3-p0
--enable-shared --disable-install-doc --with-gcc=clang --with-gcc=clang --with-gcc=clang --with-gcc=clang --with-gcc=clang --with-libyaml-dir=/home/omni/.rvm/usr ', please read /home/omni/.rvm/log/ruby-1.9.3-p0/configure.log ERROR: There has
been an error while running configure. Halting the installation.
我的gcc版本是:
~ % gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/i386-linux-gnu/gcc/i686-linux-gnu/4.5.2/lto-wrapper
Target: i686-linux-gnu
Configured with: ../src/configure -v
--with-pkgversion='Ubuntu/Linaro 4.5.2-8ubuntu4' --with-bugurl=file:///usr/share/doc/gcc-4.5/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.5 --enable-shared --enable-multiarch --with-multiarch-defaults=i386-linux-gnu --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib/i386-linux-gnu --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.5 --libdir=/usr/lib/i386-linux-gnu --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-plugin --enable-gold --enable-ld=default --with-plugin-ld=ld.gold --enable-objc-gc --enable-targets=all --disable-werror --with-arch-32=i686 --with-tune=generic --enable-checking=release --build=i686-linux-gnu --host=i686-linux-gnu --target=i686-linux-gnu
Thread model: posix
gcc version 4.5.2 (Ubuntu/Linaro 4.5.2-8ubuntu4)
我已經在很長一段時間,並不能找到一個解決方案。
我睡在這個問題上,讓我的電腦也休眠(重新啓動)。今天早上我能夠安裝紅寶石,沒有問題。重新啓動很少修復像這樣的問題,但在這種情況下,它確實發生了,我真的不熱衷於深入挖掘問題。感謝幫助。 – Omnipresent 2012-01-14 18:42:25