Ruby-build: Fail to download ruby

Created on 24 Aug 2018  路  3Comments  路  Source: rbenv/ruby-build

I am trying to rebuild ruby with a new openssl version. The previous one was from 2012, this one from 2017. I am on Ubuntu

openssl version
OpenSSL 1.0.2l  25 May 2017
ruby-build 2.4.1 ~/.rbenv/versions/2.4.1 --with-openssl-dir=/usr/local
Downloading ruby-2.4.1.tar.bz2...
-> https://cache.ruby-lang.org/pub/ruby/2.4/ruby-2.4.1.tar.bz2
error: failed to download ruby-2.4.1.tar.bz2

BUILD FAILED (Ubuntu 13.04 using ruby-build 20180822)

If i run wget, it looks like it works:

wget https://www.openssl.org/source/openssl-1.0.2l.tar.gz

but if I try to download the ruby version specified, I obtain an error:

wget https://rubygems.org/rubygems/rubygems-2.7.7.tgz
Resolving rubygems.org (rubygems.org)... 151.101.192.70, 151.101.64.70, 151.101.0.70, ...
Connecting to rubygems.org (rubygems.org)|151.101.192.70|:443... connected.
OpenSSL: error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version
Unable to establish SSL connection.

Any idea?

Most helpful comment

Problem solved. My wget version was simply too old.

All 3 comments

Problem solved. My wget version was simply too old.

Thank you for posting the solution. I've spent the last 20 minutes looking for the answer to this issue.

I was having the same issue but on Mac OSX 10.14.1 (Mojave) and I ran ruby-install instead of ruby-build. The error was:

Connecting to cache.ruby-lang.org|151.101.197.178|:443... connected.
OpenSSL: error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version
Unable to establish SSL connection.
!!! Download of https://cache.ruby-lang.org/pub/ruby/2.5/ruby-2.5.3.tar.bz2 failed!

Upgrading wget (brew upgrade wget) fixed it.

Yep me too. Cheers @edap and thanks @BMorearty for providing the google keywords I needed. 馃槅

Was this page helpful?
0 / 5 - 0 ratings