2012-12-25 61 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

回答