RVM fails installing Ruby

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-11 11:40:34

问题


I'm trying to install an older Ruby version via RVM but the installation fails with an error I've never seen before. I've already changed the rvm_max_time_flag but it didn't help. What can I do here?

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.

回答1:


It says that the URL does not exist OR the URL has no ruby version available for download.

Try installing with a compatible ruby-gem version:

rvm install 1.9.3p484 --rubygems 2.0.9

OR

Update

Are you sure that you are using an updated version of RVM?

rvm get head
rvm install 1.9.3

Hope it helps :)




回答2:


1) Make sure you are using latest RVM rvm get head 2) and then install new ruby rvm install ruby-2.3




回答3:


Solution

Do rvm list known. If it does not list the ruby version one is after, one can still install that version from local source. Some ruby versions are not maintained and won't be listed and rvm might generate the wrong URL.

For example installing ruby-1.9.3-p484 goes like this:

First download the ruby archive into RVMs archives folder:

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

Then install with the following flags:

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

Explanation

I had to do it like this after not being able to do: rvm install ruby-1.9.3p484

Since the above command generated this error:

The requested url does not exist(22): 'https://cache.ruby-lang.org/pub/ruby/./ruby-1.9.3p484.tar.bz2' Checking fallback: https://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.

Also see this SO answer RVM install ruby from local source




回答4:


I resolve that just changing the mod of the path of rvm

sudo chmod 777 -R /path/to/rvm 

in my case: /usr/local/rvm



来源:https://stackoverflow.com/questions/23339379/rvm-fails-installing-ruby

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!