简体   繁体   中英

Unable to install Ruby 2.4.0 using rbenv on Ubuntu 16.04 LTS

I am trying to install Ruby 2.4.0 using rbenv and I get an error as shown below

`a@a:~$ rbenv install 2.4.0
Downloading ruby-2.4.0.tar.bz2...
-> https://cache.ruby-lang.org/pub/ruby/2.4/ruby-2.4.0.tar.bz2
error: failed to download ruby-2.4.0.tar.bz2

BUILD FAILED (Ubuntu 16.04 using ruby-build 20170726)

Inspect or clean up the working tree at /tmp/ruby-build.20170806000333.10203
Results logged to /tmp/ruby-build.20170806000333.10203.log

Last 10 log lines:
/tmp/ruby-build.20170806000333.10203 ~
Unable to establish SSL connection.

`

I am totally clueless on how to resolve this. I'll be glad if someone could please help me.

Thanks in advance.

probably this steps can help you solve the problem

mkdir ~/.rbenv/cache
rbenv install 2.4.0

or

mkdir ~/.rbenv/cache
# download manually ruby file
wget https://cache.ruby-lang.org/pub/ruby/2.4/ruby-2.4.0.tar.bz2
# move file
mv ruby-2.4.0.tar.bz2 ~/.rbenv/cache
# do the install
rbenv install 2.4.0

您是否有任何防火墙可能阻止了它?

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM