RVM中的配置错误

时间:2014-04-22 15:58:24

标签: ruby rvm ruby-1.9.3

我正在尝试下载ruby 1.9.3(出于学习目的,这是本书中的版本) 当我运行$rvm install 1.9.3时,我收到配置错误:

  

运行错误'./configure --prefix = / Users / john / .rvm / rubies / ruby​​-1.9.3-p545 --with-opt-dir = / usr / local / Cellar / libyaml / 0.1.6 :/usr/local/Cellar/readline/6.3.3:/usr/local/Cellar/libksba/1.3.0:/usr/local/Cellar/openssl/1.0.1g --without-tcl --without-tk - -disable-install-doc --enable-shared',   显示最后15行/Users/john/.rvm/log/1398181983_ruby-1.9.3-p545/configure.log

然后最后15行是:

[2014-04-22 10:53:15] ./configure
current path: /Users/john/.rvm/src/ruby-1.9.3-p545
PATH=/usr/local/Cellar/pkg-config/0.28/bin:/usr/local/Cellar/libtool/2.4.2/bin:/usr/local/Cellar/automake/1.14.1/bin:/usr/local/Cellar/autoconf/2.69/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/git/bin:/Users/john/.rvm/bin:/Users/john/.rvm/bin
command(7): ./configure --prefix=/Users/john/.rvm/rubies/ruby-1.9.3-p545 --with-opt-dir=/usr/local/Cellar/libyaml/0.1.6:/usr/local/Cellar/readline/6.3.3:/usr/local/Cellar/libksba/1.3.0:/usr/local/Cellar/openssl/1.0.1g --without-tcl --without-tk --disable-install-doc --enable-shared
configure: WARNING: unrecognized options: --without-tcl, --without-tk
checking build system type... i386-apple-darwin13.1.0
checking host system type... i386-apple-darwin13.1.0
checking target system type... i386-apple-darwin13.1.0
checking whether the C compiler works... no
configure: error: in `/Users/john/.rvm/src/ruby-1.9.3-p545':
configure: error: C compiler cannot create executables

有谁知道这里有什么问题吗?因为我是新人,所以我认为它很简单...

提前致谢!

1 个答案:

答案 0 :(得分:2)

问题在于c compliers。你应该做的

  

sudo apt-get install clang&& rvm install 1.9.3 --with-gcc = clang