簡體   English   中英

通過RVM安裝Ruby 1.9.2失敗

[英]Installing Ruby 1.9.2 through RVM fails

我按照rvm上的官方指南安裝了RVM。 我在rvm install 1.8.7安裝了Ruby 1.8.7,然后在rvm 1.8.7 --default中將其設置為默認值。

然后我嘗試使用rvm install 1.9.2 ,還嘗試了rvm install 1.9.2-head 一切順利,直到我到達“ ruby​​-1.9.2-head-#installing-part”。

然后我收到了一個巨大的錯誤列表,抱怨我的* nix bash命令:

/Home/kevin/.rvm/scripts/Manager: line 1760: sed: command not found
/Home/kevin/.rvm/scripts/Manager: line 1762: mv: command not found
/Home/kevin/.rvm/scripts/Manager: line 1762: chmod: command not found
/Home/kevin/.rvm/scripts/Manager: line 1632: cp: command not found
/Usr/bin/env: bash: The file or directory does not exist
/Home/kevin/.rvm/scripts/utilities: line 233: mkdir: command not found
/Home/kevin/.rvm/scripts/utilities: line 237: date: command not found
/Usr/bin/env: bash: The file or directory does not exist
/Usr/bin/env: bash: The file or directory does not exist
/Home/kevin/.rvm/scripts/utilities: line 233: mkdir: command not found
/Home/kevin/.rvm/scripts/utilities: line 237: date: command not found
/Usr/bin/env: bash: The file or directory does not exist
/Home/kevin/.rvm/scripts/Manager: line 1736: mkdir: command not found
/Home/kevin/.rvm/scripts/Manager: line 1738: ln: command not found
/Home/kevin/.rvm/scripts/Manager: line 1760: sed: command not found
/Home/kevin/.rvm/scripts/Manager: line 1762: mv: command not found
/Home/kevin/.rvm/scripts/Manager: line 1762: chmod: command not found
/Home/kevin/.rvm/scripts/Manager: line 1760: sed: command not found
/Home/kevin/.rvm/scripts/Manager: line 1762: mv: command not found
/Home/kevin/.rvm/scripts/Manager: line 1762: chmod: command not found
/Usr/bin/env: bash: The file or directory does not exist
/Home/kevin/.rvm/scripts/utilities: line 233: mkdir: command not found
/Home/kevin/.rvm/scripts/utilities: line 237: date: command not found
/Usr/bin/env: bash: The file or directory does not exist
/Usr/bin/env: bash: The file or directory does not exist
/Home/kevin/.rvm/scripts/Manager: line 1562: cp: command not found
/Home/kevin/.rvm/scripts/Manager: line 1573: chmod: command not found
/Home/kevin/.rvm/scripts/Manager: line 1562: cp: command not found
/Home/kevin/.rvm/scripts/Manager: line 1573: chmod: command not found
/Home/kevin/.rvm/scripts/Manager: line 1562: cp: command is not
/Home/kevin/.rvm/scripts/Manager: line 1573: chmod: command not found
/Home/kevin/.rvm/scripts/Manager: line 1562: cp: command not found
/Home/Kevin/.rvm/scripts/Manager: line 1573: chmod: command not found
/Home/kevin/.rvm/scripts/Manager: line 1562: cp: command not found
/Home/kevin/.rvm/scripts/Manager: line 1573: chmod: command not found
/Home/kevin/.rvm/scripts/Manager: line 1562: cp: command not found
/Home/kevin/.rvm/scripts/Manager: line 1573: chmod: command not found
/Home/kevin/.rvm/scripts/Manager: line 1562: cp: command not found
/Home/kevin/.rvm/scripts/Manager: line 1573: chmod: command not found
/Usr/bin/env: bash: The file or directory does not exist
/Home/kevin/.rvm/scripts/utilities: line 276: mkdir: command not found
/Home/kevin/.rvm/scripts/utilities: line 280: date: command not found
/Usr/bin/env: bash: The file or directory does not exist
/Home/kevin/.rvm/scripts/utilities: line 656: cp: command not found
/Usr/bin/env: bash: The file or directory does not exist

如果輸入rvm 1.9.2 --default得到相同的錯誤輸出,並且$PATH變量將被完全清除。

有人對此問題有解決方案嗎?

要重新安裝並重新啟動RVM,只需執行rm -rfv ~/.rvmrm ~/.rvmrc如果有)。

也許“ 在帶有RVM的OSX上安裝Rails 3 ”會為您提供幫助。

我有同樣的問題,看起來整個RVM腳本都壞了。 rvm install ree命令沒有失敗,但是運行rvm use ree我開始遇到問題。

$PATH變量不是空的,就像rvm use 1.9.2 ,但是它錯過了/bin/usr/bin這樣的重要路徑。

這是一個示例控制台會話:

calas@chamonix:~$ ls
Desktop  dev  Documents ...
calas@chamonix:~$ rvm use ree
info: Using /home/calas/.rvm/gems/ree-1.8.7-2010.02
calas@chamonix:~$ ls
Command 'ls' is available in '/bin/ls'
The command could not be located because '/bin' is not included in the PATH environment variable.
ls: command not found
calas@chamonix:~$ rvm info
Command 'sed' is available in '/bin/sed'
The command could not be located because '/bin' is not included in the PATH environment variable.
sed: command not found
bash: grep: No such file or directory
bash: mkdir: No such file or directory
bash: grep: No such file or directory
/usr/bin/env: bash: No such file or directory

運行rvm info$PATH變量為空。

我用rvm implode刪除了整個RVM安裝並重新安裝,但這沒有用。

我猜解決方案是降級或等待新版本。


解決方案已在git源中准備好:

rvm update --head && rvm reload

並解決了問題,謝謝韋恩!

這樣的事情剛發生在我身上,經過仔細檢查,我只是在路徑上缺少了/user/bin 但為什么?

事實證明,經過一番調查, 我在$PATH之前缺少一個冒號 ,這導致默認路徑(即/ user / bin)中的第一個目錄被忽略。

一旦我改變了這個:
export PATH=$SCRIPTS:$WORKSPACE:$ANDROID_HOME:$HEROKU$PATH
對此:
export PATH=$SCRIPTS:$WORKSPACE:$ANDROID_HOME:$HEROKU:$PATH

(注意冒號在最后一個“ $”之前添加)
一切又恢復了。 顯然,您的路徑會有所不同,但請檢查是否缺少冒號。

也許“ 如何在Ubuntu 11.10中安裝Ruby on Rails ”將為您提供幫助。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM