错误:运行'GEM_PATH =“qhen运行”sudo rvm install 1.9.3-p194“时出错

时间:2013-01-11 23:05:35

标签: ruby-on-rails ruby install rvm

  

可能重复:
  Installed Ruby 1.9.3 with RVM but command line doesn’t show ruby -v

我试着运行这个命令 - > sudo rvm install 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/ruby-1.9.3-p194@global:/usr/share/ruby-rvm/gems/ruby-1.9.3-p194:/usr/share/ruby-rvm/gems/ruby-1.9.3-p194@global" 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

2 个答案:

答案 0 :(得分:0)

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

答案 1 :(得分:0)

您使用的是与Ubuntu一起打包的非常旧版本的RVM,请务必遵循此回答中的说明https://stackoverflow.com/a/9056395/497756 - 在{RVM}中不再使用gunzip,因此应修复此问题。