RVM失败安装Ruby(RVM fails installing Ruby)

2019-10-20 00:35发布

我试图通过安装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.

Answer 1:

它说,该网址不存在或URL没有可供下载的红宝石版本。

尝试用兼容红宝石宝石版本上安装:

rvm install 1.9.3p484 --rubygems 2.0.9

要么

更新

你确定你正在使用RVM的更新版本?

rvm get head
rvm install 1.9.3

希望能帮助到你 :)



Answer 2:

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



Answer 3:

做到rvm list known 。 如果没有列出红宝石版本是一个后,人们仍然可以安装本地源该版本。 有些红宝石版本不维护,不会上市和RVM可能会产生错误的URL。

例如安装Ruby-1.9.3-P484是这样的:

首先下载红宝石归档到档案RVM的文件夹:

cd ~/.rvm/archives; wget http://cache.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p484.tar.bz2

然后用下面的标志安装:

rvm install 1.9.3-p484 --verify-downloads 2 --disable-binary

说明

我没有能够做后做这样的: rvm install ruby-1.9.3p484

由于上述命令生成该错误:

所请求的网址不存在(22): ' https://cache.ruby-lang.org/pub/ruby/./ruby-1.9.3p484.tar.bz2 '检查回退: HTTPS://ftp.ruby- lang.org/pub/ruby/./ruby-1.9.3p484.tar.bz2没有后备网址可以发现,尝试用增加超时:

回声 “出口rvm_max_time_flag = 20” >>〜/ .rvmrc

目前已经获取了Ruby解释器的错误。 暂停安装。

另请参阅该SO回答RVM从本地源安装Ruby



Answer 4:

我解决只是改变RVM的路径的MOD

sudo chmod 777 -R /path/to/rvm 

在我的情况:在/ usr /本地/ RVM



文章来源: RVM fails installing Ruby