Here's what. I first did:
rvm get stable
rvm install ruby-2.2.2
No deal. It shows me the following:
$ rvm install ruby-2.2.2
Searching for binary rubies, this might take some time.
No binary rubies available for: ubuntu/14.04/i386/ruby-2.2.2.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Checking requirements for ubuntu.
Requirements installation successful.
Installing Ruby from source to: /home/myuser/.rvm/rubies/ruby-2.2.2, this may take a while depending on your cpu(s)...
ruby-2.2.2 - #downloading ruby-2.2.2, 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:00:19 --:--:-- 0Warning: Transient problem: timeout Will retry in 2 seconds. 3 retries left.
0 0 0 0 0 0 0 0 --:--:-- 0:00:19 --:--:-- 0Warning: Transient problem: timeout Will retry in 2 seconds. 2 retries left.
0 0 0 0 0 0 0 0 --:--:-- 0:00:19 --:--:-- 0Warning: Transient problem: timeout Will retry in 2 seconds. 1 retries left.
0 0 0 0 0 0 0 0 --:--:-- 0:00:19 --:--:-- 0curl: (6) Could not resolve host: cache.ruby-lang.org
There was an error(6).
Checking fallback: http://ftp.ruby-lang.org/pub/ruby/2.2/ruby-2.2.2.tar.bz2
Checking fallback: http://www.mirrorservice.org/sites/ftp.ruby-lang.org/pub/ruby/2.2/ruby-2.2.2.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.
I increased the timeout as told:
echo "export rvm_max_time_flag=20" >> ~/.rvmrc
But no deal. I also did rvm get head
and did it all over again with higher timeouts but it was still no good.
what can I do to correctly install ruby-2.2.2 on ubuntu?
I feel lame, but the problem was that my VM's internet connection was failing. (I guess I missed Troubleshooting-101, hehe)
I changed the PC's network and the Virtual Box VM didn't update or connect to the new network. To add to the issue, none of the commands ( rvm get stable
; rvm get head
; rvm install ruby-2.2.2
) raised a warning, so I was led to think it was something else.
"Errors should never pass silently." (The Zen of Python)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.