2013-03-04 24 views
3

我想通過rvm安裝ruby。添加/usr/bin/gcc-4.2到路徑 - 安裝ruby

rvm install ruby-1.9.3-p286 

,但我得到了以下錯誤:

Searching for binary rubies, this might take some time. 
No binary rubies available for: osx/10.8/x86_64/ruby-1.9.3-p286. 
Continuing with compilation. Please read 'rvm mount' to get more information on binary rubies. 
You requested building with '/usr/bin/gcc-4.2' but it is not in your path. 

指的錯誤的最後一行,我如何才能 'USR /斌/ GCC-4.2' 在我的路徑?

我已經嘗試添加以下PATH="/usr/bin:$PATH"到我的.bash_profile,但沒有運氣。

+0

你的系統上是否安裝了GCC編譯器?如果有,是GCC 4.2.x嗎?如果你根本沒有任何GCC,你需要得到一個(雖然GCC 4.2幾乎不是最新的;這是4.7.2,在一個或兩個月內4.8)。如果你有一個GCC,它是什麼版本。如果它是一個4.2.x版本,你可以去'/ usr/bin',並且明確的良心做'ln -s gcc gcc-4.2'。如果你有一個更新的版本,你可能會決定打開,然後做鏈接。但是你的問題是'/ usr/bin/gcc-4.2'沒有指向GCC的一個版本。 – 2013-03-04 15:34:41

回答

3

運行以下命令:

rvm requirements 

然後按照步驟指示什麼。

+0

爲osx/10.8/x86_64安裝需求,可能需要sudo密碼 跳過'brew update'確保您的公式是最新的。 /Users/marty/.rvm/scripts/functions/build:第68行:/usr/bin/gcc-4.2:沒有這樣的文件或目錄 /usr/local/etc/openssl cert.pem => 77ee3751。 0 – FluxEngine 2013-03-04 15:13:46

+0

這幫助我解決原始帖子中的問題。 'rvm requirements'打印出大量有關您的環境的有用信息,並提供有關如何配置每個部分的建議。我已經寫下了CoderWall的詳細信息:https://coderwall.com/p/p1g2kg – 2014-05-12 00:06:30