0

可能重复:
使用 RVM 安装了 Ruby 1.9.3,但命令行不显示 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
4

2 回答 2

0

您正在使用与 Ubuntu 一起打包的非常旧版本的 RVM,请确保遵循此答案中的说明https://stackoverflow.com/a/9056395/497756 - gunzipRVM 中不再使用此问题,因此应该解决此问题。

于 2013-01-12T02:13:19.817 回答
0

首先你为什么在rvm之前使用sudo命令?此链接将在 rvm.io/rubies/rubygems 中为您提供帮助。我不认为你必须使用 sudo。
您还可以在使用 rvm 安装 ruby​​ 1.9.3 时查看此问题错误
此外,“rvm install ruby​​”将为您安装最新的稳定版 ruby​​。

于 2013-01-11T23:30:56.923 回答