2012-10-06 253 views
3

On installing Ruby1.9.3 with RVMrvm install 1.9.3,顯示如下信息。安裝ruby rvm時出錯

The program 'rvm' is currently not installed. You can install it by typing: 
sudo apt-get install ruby-rvm 

之後,我試圖安裝ruby-rvm,但最終顯示如下消息。

... 
Setting up libreadline-gplv2-dev (5.2-11) ... 
Setting up ruby-rvm (1.6.9-0ubuntu2) ... 
dpkg-statoverride: error: syntax error: unknown group 'admin' in statoverride file 
dpkg: error processing ruby-rvm (--configure): 
subprocess installed post-installation script returned error exit status 2 
Errors were encountered while processing: 
ruby-rvm 
E: Sub-process /usr/bin/dpkg returned an error code (1) 

receving這個消息我在here查找後,但我不能夠計算上面的錯誤代碼是什麼意思。

[email protected]:~$ source /usr/local/rvm/scripts/rvm 

[email protected]:~$ type rvm | head -1 
rvm is a function 

[email protected]:~$ rvm use 1.9.3 --default 
ruby-1.9.3-p194 is not installed. 
To install do: 'rvm install ruby-1.9.3-p194' 

[email protected]:~$ rvm install ruby-1.9.3-p194 
ruby-1.9.3-p194 - #configure 
ruby-1.9.3-p194 - #download 
Archive checksum did not match, downloading again. 
rm: cannot remove `bin-ruby-1.9.3-p194.tar.bz2': Permission denied 
curl: Can't open 'bin-ruby-1.9.3-p194.tar.bz2'! 
curl: try 'curl --help' or 'curl --manual' for more information 
There was an error(23), please check /usr/local/rvm/log//*.log. Next we'll try to fetch via http. 
Trying ftp:// URL instead. 
curl: Can't open 'bin-ruby-1.9.3-p194.tar.bz2'! 
curl: try 'curl --help' or 'curl --manual' for more information 
There was an error(23), please check /usr/local/rvm/log//*.log 
Downloading https://rvm.io/binaries/ubuntu/12.04/x86_64/ruby-1.9.3-p194.tar.bz2 failed. 
Mounting remote ruby failed, trying to compile. 
Installing Ruby from source to: /usr/local/rvm/rubies/ruby-1.9.3-p194, this may take a while depending on your cpu(s)... 
ruby-1.9.3-p194 - #downloading ruby-1.9.3-p194, this may take a while depending on your connection... 
mkdir: cannot create directory `/usr/local/rvm/log/ruby-1.9.3-p194': Permission denied 
tee: /usr/local/rvm/log/ruby-1.9.3-p194/fetch.log: No such file or directory 
bash: /usr/local/rvm/log/ruby-1.9.3-p194/fetch.log: No such file or directory 
Error running '/usr/local/rvm/scripts/fetch http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p194.tar.bz2', please read /usr/local/rvm/log/ruby-1.9.3-p194/fetch.log 
There has been an error fetching the ruby interpreter. Halting the installation. 
bash: /usr/local/rvm/user/installs.new: Permission denied 
mv: cannot stat `/usr/local/rvm/user/installs.new': No such file or directory 
bash: /usr/local/rvm/user/installs: Permission denied 

我曾試圖安裝它,浪費3天但能不能上安裝Ruby on Rails成功,並解決上述error.As我是新來的紅寶石任何幫助被讚賞。

環境:Ubuntu的12.04 64位

回答

2

你試圖用apt-get安裝。你可能已經安裝了ruby-rvm,但是由於它已經過時了,所以它被安裝了。您可能必須使用突觸或通過sudo apt-get purge ruby-rvm命令將其刪除。您不應該通過apt-get安裝rvm。閱讀瑞安更貼心的帖子。正確的安裝rvm命令是:

curl -L https://get.rvm.io | bash -s stable

+1

感謝響應我已經試過[這](http://stackoverflow.com/questions/9056008/installed-ruby-1-9-3 -with-rvm-but-command-line-doesnt-show-ruby-v),現在我覺得我在循環中。 – Lionel

+0

雖然這並沒有解決我的問題,我接受了答案 – Lionel