2013-03-23 33 views
3

我一直在檢查其他人的問題,因爲有人在安裝Ruby和Ruby時遇到問題1.9.3 ,問題似乎與我的等同,所以我嘗試提供沒有成功的解決方案:無法在OS X Lion中通過rvm安裝Ruby 1.9.3甚至使用「--with-gcc = clang」

我第一次嘗試: rvm install 1.9.3 --with-gcc=clang

返回: Installing requirements for osx/10.7/x86_64, might require sudo password. Skipping `brew update` make sure your formulas are up to date. Missing required packages: libtool, pkg-config, libyaml, readline, libxml2, libxslt, openssl, sqlite. requirements_brew_generate_openssl_cert:4: no such file or directory: /usr/local/Cellar/openssl/1.0.1e/bin/openssl Skipping update of certificates in '/cert.pem'. Warning: found user selected compiler 'clang', this will suppress RVM auto detection mechanisms. Installing Ruby from source to: /Users/****/.rvm/rubies/ruby-1.9.3-p392, this may take a while depending on your cpu(s)... ruby-1.9.3-p392 - #downloading ruby-1.9.3-p392, this may take a while depending on your connection... ruby-1.9.3-p392 - #extracted to /Users/****/.rvm/src/ruby-1.9.3-p392 (already extracted) ruby-1.9.3-p392 - #configuring................................................................................................................................................................................................................................................................................................................................................................................................................................................................. ruby-1.9.3-p392 - #compiling................ ruby-1.9.3-p392 - #installing .............. ruby-1.9.3-p392 is not installed. To install do: 'rvm install ruby-1.9.3-p392'

通知ruby-1.9.3-p392 is not installed.如何附近出現到結束。

我試圖做的是通過事後的建議如下: CC=/usr/bin/gcc-4.2 rvm install 1.9.3 --enable-shared

但它返回: You requested building with '/usr/bin/gcc-4.2' but it is not in your path.

所以我基本上不知道如何繼續呆在這裏。任何幫助將不勝感激。提前致謝。

回答

8

這應該解決這個問題:

rvm get head 
rvm install 1.9.3 --autolibs=4 
+0

非常感謝您的先生。你能否解釋一下「--autolibs = 4」呢?我只是很好奇我剛剛做了什麼:P – 2013-03-23 16:37:12

+2

here is description => http://bit.ly/rvm-autolibs - 我將使這些標誌更具描述性,使用這張票,改變目前的狀態 - 大多數當前的4將被刪除,並插入新的狀態2,但是4是最大的 - 盡你所能 – mpapis 2013-03-23 16:47:48

+0

使用這些命令,我​​得到:搜索二進制紅寶石,這可能需要一些時間。 沒有二進制紅寶石可用於:osx/10.8/x86_64/ruby​​-1.9.3-p392。 繼續編譯。請閱讀'rvm mount'以獲取關於二進制紅寶石的更多信息。 爲osx安裝需求可能需要sudo密碼。 /Users/alex/.rvm/scripts/functions/build_requirements:第28行:跳過'brew update'確保你的公式是最新的。:找不到命令 – 2013-03-30 05:11:15

0

安裝失敗,因爲家釀需要保持一定的包裝進行更新。在代碼的第二行「跳過brew update確保您的公式是最新的。」

brew update 

可能需要

sudo brew update 

然後

rvm install 1.9.3 --with-gcc=clang 

應該重寫RVM讓您下載紅寶石的穩定版本1.9.3

sudo rvm install 1.9.3 --with-gcc=clang 

可能工作以及。