RVM无法安装Ruby

时间:2014-04-28 11:02:02

标签: ruby-on-rails ruby rvm

我试图通过RVM安装较旧的Ruby版本,但安装失败并出现了我以前从未见过的错误。我已经更改了rvm_max_time_flag,但它没有帮助。我能在这做什么?

rvm install 1.9.3p484
Searching for binary rubies, this might take some time.
No binary rubies available for: osx/10.9/x86_64/ruby-1.9.3p484.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Checking requirements for osx.
Certificates in '/usr/local/etc/openssl/cert.pem' already are up to date.
Requirements installation successful.
Installing Ruby from source to: /Users/nandersen/.rvm/rubies/ruby-1.9.3p484, this may take a while depending on your cpu(s)...
ruby-1.9.3p484 - #downloading ruby-1.9.3p484, this may take a while depending on your connection...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
curl: (22) The requested URL returned error: 404 Not Found
The requested url does not exist(22): 'http://cache.ruby-lang.org/pub/ruby/./ruby-1.9.3p484.tar.bz2'
Checking fallback: http://ftp.ruby-lang.org/pub/ruby/./ruby-1.9.3p484.tar.bz2
Checking fallback: http://www.mirrorservice.org/sites/ftp.ruby-lang.org/pub/ruby/./ruby-1.9.3p484.tar.bz2
No fallback URL could be found, try increasing timeout with:

    echo "export rvm_max_time_flag=20" >> ~/.rvmrc

There has been an error fetching the ruby interpreter. Halting the installation.

4 个答案:

答案 0 :(得分:3)

它表示URL不存在或URL没有可供下载的ruby版本。

尝试使用兼容的ruby-gem版本进行安装:

rvm install 1.9.3p484 --rubygems 2.0.9

OR

<强>更新

您确定使用的是RVM的更新版本吗?

rvm get head
rvm install 1.9.3

希望有所帮助:)

答案 1 :(得分:3)

1)确保您使用的是最新的RVM rvm get head 2)然后安装新的红宝石 rvm install ruby-2.3

答案 2 :(得分:0)

也面临类似的问题, rvm install 2.5.x无效, 看到以下错误:

将Ruby从源代码安装到/Users/sdorwat/.rvm/rubies/ruby-2.5.x,这可能需要一些时间,具体取决于您的CPU。 ruby-2.5.x-#下载ruby-2.5.x,这可能需要一段时间,具体取决于您的连接... %总计%收到的%Xferd平均速度时间时间时间当前 Dload上传总花费左手速度 0 0 0 0 0 0 0 0-:-:--:-:--:-:-0 curl:(22)请求的URL返回错误:404 请求的网址不存在(22):'https://cache.ruby-lang.org/pub/ruby/./ruby-2.5.x.tar.bz2' 检查后备:https://ftp.ruby-lang.org/pub/ruby/./ruby-2.5.x.tar.bz2 找不到后备网址,请尝试通过以下方法增加超时时间: 。 。 提取ruby解释器时出错。停止安装。

以下命令有效: rvm install ruby-2.5

答案 3 :(得分:-4)

我决定只改变rvm路径的mod

sudo chmod 777 -R /path/to/rvm 

在我的情况下:/ usr / local / rvm