2012-12-25 135 views
0

我试图通过RVM更新的Ruby 1.9.3-P327。打字rvm install 1.9.3-p327后,我得到这个:运行configure时出错。暂停安装

No binary rubies available for: downloads/ruby-1.9.3-p327. 
Continuing with compilation. Please read 'rvm mount' to get more information on binary rubies. 
Installing Ruby from source to: /usr/local/rvm/rubies/ruby-1.9.3-p327, this may take a while depending on your cpu(s)... 
ruby-1.9.3-p327 - #downloading ruby-1.9.3-p327, this may take a while depending on your connection... 
ruby-1.9.3-p327 - #extracted to /usr/local/rvm/src/ruby-1.9.3-p327 (already extracted) 
ruby-1.9.3-p327 - #configuring 
Error running 'env LDFLAGS=-L/opt/sm/pkg/active/lib CFLAGS=-I/opt/sm/pkg/active/include CPATH=/opt/sm/pkg/active/include ./configure --enable-shared --disable-install-doc --prefix=/usr/local/rvm/rubies/ruby-1.9.3-p327 --with-opt-dir=/usr/local/rvm/usr', please read /usr/local/rvm/log/ruby-1.9.3-p327/configure.log 
There has been an error while running configure. Halting the installation. 

然后,我检查的配置日志中ruby 1.9.3-p327/configure.log中,我看到这一点:

[2012-12-24 22:39:14] env LDFLAGS=-L/opt/sm/pkg/active/lib CFLAGS=-  I/opt/sm/pkg/active/include CPATH=/opt/sm/pkg/active/include ./configure --enable-shared --disable-install-doc --prefix=/usr/local/rvm/rubies/ruby-1.9.3-p327 --with-opt-dir=/usr/local/rvm/usr 
checking build system type... x86_64-apple-darwin11.4.2 
checking host system type... x86_64-apple-darwin11.4.2 
checking target system type... x86_64-apple-darwin11.4.2 
checking whether the C compiler works... no 
configure: error: in `/usr/local/rvm/src/ruby-1.9.3-p327': 
configure: error: C compiler cannot create executables 
See `config.log' for more details 

我已经安装了最新的Xcode 4.5.2以及通过Xcode安装CLT ..好像C编译器不工作,我不知道如何解决它。任何建议?

+0

也许你试过已位于,但你最好的选择是谷歌的“配置:错误:C编译器不能创建可执行文件”。在那里你会发现很多这个问题的答案。你也可能会缺少'ld'(链接器..它是在谷歌的答案之一)。 – Casper

+0

实际上,在发布此消息后,我使用了精确的字符串a。我注意到Xcode有些东西很腥,最后重新安装。有效。谢谢 – gregnowicki

回答