2014-10-11 75 views
3

我發現了其他用戶遇到類似問題的幾個線程,但其中沒有一個看起來像這樣。無法使用rbenv在OSX 10.10 GM 3.0上構建Ruby 2.1.3

發出命令後:

rbenv install 2.1.3 

我收到以下錯誤:

Installing ruby-2.1.3... 

BUILD FAILED (OS X 10.10 using ruby-build 20140926) 

Inspect or clean up the working tree at /var/folders/y_/5mjltxsn35q0n_k5817bszlw0000gn/T/ruby-build.20141010202255.63586 
Results logged to /var/folders/y_/5mjltxsn35q0n_k5817bszlw0000gn/T/ruby-build.20141010202255.63586.log 

Last 10 log lines: 
checking for stdint.h... yes 
checking for unistd.h... yes 
checking minix/config.h usability... no 
checking minix/config.h presence... no 
checking for minix/config.h... no 
checking whether it is safe to define __EXTENSIONS__... yes 
checking for cd using physical directory... cd -P 
checking whether CFLAGS is valid... no 
configure: error: something wrong with CFLAGS=" -O3 -Wno-error=shorten-64-to-32 " 
make: *** No targets specified and no makefile found. Stop. 
+1

從[這裏](https://github.com/sstephenson/rbenv/issues/610),你有沒有試過這個? 'RUBY_CONFIGURE_OPTS =「 - without-gcc --disable-install-rdoc」rbenv install 2.1.3' – 2014-10-11 03:32:18

回答

8

家釀包上約塞米蒂seems to be broken GCC。這就是爲什麼它不起作用。

有同樣的問題。運行:

CC=/usr/bin/gcc rbenv install 2.1.3 

爲我工作。

+0

自制軟件包似乎已修復。 'brew update && brew upgrade ruby​​-build'現在應該對它進行排序:) – 2015-01-16 17:02:58

0

這已經在rbenv的ruby-build中修復了。請更新以下內容:

cd ~/.rbenv/plugins/ruby-build/ 
git pull 
+0

謝謝,我記得過去我已經完成了這個工作,並且工作成功。 – damianesteban 2014-11-19 20:48:57

相關問題