升级到Ruby2.0时出错

时间:2013-06-08 22:56:48

标签: ruby-on-rails ruby homebrew ruby-2.0

基本上,当按照这些说明尝试安装Ruby2.0时:http://architects.dzone.com/articles/upgrading-ruby-20-mountain我遇到了困难。

具体在此步骤:“rvm install 2.0.0”

我收到以下错误:

Error running 'env LDFLAGS=-L/opt/sm/pkg/active/lib CFLAGS=-I/opt/sm/pkg/active/include CPATH=/opt/sm/pkg/active/include ./configure --prefix=/usr/local/rvm/rubies/ruby-2.0.0-p195 --with-opt-dir=/opt/sm/pkg/active --disable-install-doc --without-tcl --without-tk --enable-shared',
please read /usr/local/rvm/log/ruby-2.0.0-p195/1370731952_configure.log
There has been an error while running configure. Halting the installation.

按照命令提示符指令读取“/usr/local/rvm/log/ruby-2.0.0-p195/1370731952_configure.log”

configure.log文件:

[2013-06-08 18:52:32] ./configure
current path: /usr/local/rvm/src/ruby-2.0.0-p195
command(9): env LDFLAGS=-L/opt/sm/pkg/active/lib CFLAGS=-I/opt/sm/pkg/active/include CPATH=/opt/sm/pkg/active/include ./configure --prefix=/usr/local/rvm/rubies/ruby-2.0.0-p195 --with-opt-dir=/opt/sm/pkg/active --disable-install-doc --without-tcl --without-tk --enable-shared
configure: WARNING: unrecognized options: --without-tcl, --without-tk
checking build system type... x86_64-apple-darwin12.3.0
checking host system type... x86_64-apple-darwin12.3.0
checking target system type... x86_64-apple-darwin12.3.0
checking whether the C compiler works... no
configure: error: in `/usr/local/rvm/src/ruby-2.0.0-p195':
configure: error: C compiler cannot create executables
See `config.log' for more details

请告知

1 个答案:

答案 0 :(得分:1)

好的,关键错误消息是configure: error: C compiler cannot create executables。您是否找到并查看config.log(与configure.log不同)?仔细检查您不仅安装了Xcode,还安装了command line tools