2013-01-11 72 views
0

Possible Duplicate:
Installed Ruby 1.9.3 with RVM but command line doesn’t show ruby -v错误:错误运行“GEM_PATH =” qhen运行 “命令RVM安装1.9.3-P194”

我尝试运行此COMAND - >须藤RVM安装1.9.3-P194

但这个错误出现,安装目录是不成功的

Installing Ruby from source to: /usr/share/ruby-rvm/rubies/ruby-1.9.3-p194, this may take a while depending on your cpu(s)... 

ruby-1.9.3-p194 - #fetching 
ruby-1.9.3-p194 - #downloading ruby-1.9.3-p194, this may take a while depending on your connection... 
    % Total % Received % Xferd Average Speed Time Time  Time Current 
           Dload Upload Total Spent Left Speed 
100 9610k 100 9610k 0  0 181k  0 0:00:53 0:00:53 --:--:-- 235k 
ruby-1.9.3-p194 - #extracting ruby-1.9.3-p194 to /usr/share/ruby-rvm/src/ruby-1.9.3-p194 
ruby-1.9.3-p194 - #extracted to /usr/share/ruby-rvm/src/ruby-1.9.3-p194 
ruby-1.9.3-p194 - #configuring 
ruby-1.9.3-p194 - #compiling 
ruby-1.9.3-p194 - #installing 
Removing old Rubygems files... 
-e:1: Use RbConfig instead of obsolete and deprecated Config. 
Installing rubygems dedicated to ruby-1.9.3-p194... 
Retrieving rubygems-latest-1.8 
Extracting rubygems-latest-1.8 ... 

ERROR: Error running 'gunzip < /usr/share/ruby-rvm/archives/rubygems-latest-1.8.tgz | tar xf - -C /usr/share/ruby-rvm/src', please read /usr/share/ruby-rvm/log/ruby-1.9.3-p194/rubygems.extract.log 
Installing rubygems for /usr/share/ruby-rvm/rubies/ruby-1.9.3-p194/bin/ruby 

ERROR: Error running 'GEM_PATH="/usr/share/ruby-rvm/gems/ruby-1.9.3-p194:/usr/share/ruby-rvm/gems/[email protected]:/usr/share/ruby-rvm/gems/ruby-1.9.3-p194:/usr/share/ruby-rvm/gems/[email protected]" GEM_HOME="/usr/share/ruby-rvm/gems/ruby-1.9.3-p194" "/usr/share/ruby-rvm/rubies/ruby-1.9.3-p194/bin/ruby" "/usr/share/ruby-rvm/src/rubygems-latest-1.8/setup.rb"', please read /usr/share/ruby-rvm/log/ruby-1.9.3-p194/rubygems.install.log` 

WARN: Installation of rubygems did not complete successfully. 
ruby-1.9.3-p194 - adjusting #shebangs for (gem irb erb ri rdoc testrb rake). 
ruby-1.9.3-p194 - #importing default gemsets (/usr/share/ruby-rvm/gemsets/) 
Install of ruby-1.9.3-p194 - #complete 
+0

首先你为什么在rvm之前使用sudo命令?这个链接将帮助你在https://rvm.io/rubies/rubygems/。我不知道你必须使用sudo。
jizak

+0

我不认为这是链接问题的重复。但是,我确实相信这一点以及这个链接对于SO来说都是无关紧要的(在超级用户SE上更好地服务)。 – Perception

回答

0

首先你为什么RVM之前使用sudo命令的?这个链接将帮助您在rvm.io/rubies/rubygems。我这样做,你没有的东西使用sudo。
你也可以看看这个问题error while installing ruby 1.9.3 using rvm
另外'rvm install ruby​​'会安装你最新的稳定版本的ruby。

0

您使用的是与Ubuntu打包的非常旧版本的RVM,请确保遵循此答案的指示https://stackoverflow.com/a/9056395/497756 - gunzip不再用于RVM,因此应该修复此问题。

+0

我按照说明安装rvm,但是当我尝试运行这个 - >'rvm requirements' 终端显示: '程序'rvm'目前没有安装。你可以通过键入以下内容来安装它: sudo apt-get install ruby​​-rvm' –

+0

我解决了这个问题 - > [http://stackoverflow.com/questions/13192730/rvm-installation](http://stackoverflow .COM /问题/ 13192730/RVM安装) –