Closed MarcusPetri closed 2 years ago
the same error with 3.x versions.. As I understood, the problem that RVM cant work with the openssl v3. So I installed the v1 version of openssl and compiled ruby with the old version
installing the openssl v1
$ cd /usr/local/src/
$ sudo wget https://www.openssl.org/source/openssl-1.1.1s.tar.gz
$ sudo tar -xf openssl-1.1.1s.tar.gz
$ cd openssl-1.1.1s
$ sudo ./config --prefix=/usr/local/ssl --openssldir=/usr/local/ssl shared zlib
$ sudo make
$ sudo make install
$ sudo rmdir certs
$ sudo ln -sf /etc/ssl/certs/ certs
installing ruby
$ rvm install 3.1.2 --with-openssl-dir=/usr/local/ssl
I hope it will help
As this repository is dedicated to the Ubuntu installer, and this is a rvm
issue, I'll close it. In the case you need more help, please, open it (or check if there is any related issue) in the rvm repository.
@fsdevblog Thanks for raising this and to find a solution!
Optionally, you could install the
openssl
v1 provided with the PPA:sudo apt install openssl1.0
I tried before opening the issue
the same error with 3.x versions.. As I understood, the problem that RVM cant work with the openssl v3. So I installed the v1 version of openssl and compiled ruby with the old version
installing the openssl v1
$ cd /usr/local/src/ $ sudo wget https://www.openssl.org/source/openssl-1.1.1c.tar.gz $ sudo tar -xf openssl-1.1.1c.tar.gz $ cd openssl-1.1.1c $ sudo ./config --prefix=/usr/local/ssl --openssldir=/usr/local/ssl shared zlib $ sudo make $ sudo make install
installing ruby
$ rvm install 3.1.2 --with-openssl-dir=/usr/local/ssl
I hope it will help
Thanks! Ruby installed! Now I have problem with bundle install:
$ bundle -v
Bundler version 1.17.3
$ bundle install
Fetching source index from https://gems.contribsys.com/
Retrying fetcher due to error (2/4): Bundler::Fetcher::CertificateFailureError Could not verify the SSL certificate for https://gems.contribsys.com/.
There is a chance you are experiencing a man-in-the-middle attack, but most likely your system doesn't have the CA certificates needed for verification. For information about OpenSSL certificates, see http://bit.ly/ruby-ssl. To connect without using SSL, edit your Gemfile sources and change 'https' to 'http'.
Retrying fetcher due to error (3/4): Bundler::Fetcher::CertificateFailureError Could not verify the SSL certificate for https://gems.contribsys.com/.
There is a chance you are experiencing a man-in-the-middle attack, but most likely your system doesn't have the CA certificates needed for verification. For information about OpenSSL certificates, see http://bit.ly/ruby-ssl. To connect without using SSL, edit your Gemfile sources and change 'https' to 'http'.
Retrying fetcher due to error (4/4): Bundler::Fetcher::CertificateFailureError Could not verify the SSL certificate for https://gems.contribsys.com/.
There is a chance you are experiencing a man-in-the-middle attack, but most likely your system doesn't have the CA certificates needed for verification. For information about OpenSSL certificates, see http://bit.ly/ruby-ssl. To connect without using SSL, edit your Gemfile sources and change 'https' to 'http'.
Could not verify the SSL certificate for https://gems.contribsys.com/.
There is a chance you are experiencing a man-in-the-middle attack, but most likely your system doesn't have the CA certificates needed for verification. For information about OpenSSL certificates, see
http://bit.ly/ruby-ssl. To connect without using SSL, edit your Gemfile sources and change 'https' to 'http'.
@raelgc , can you reopen the issue?
The openssl you've compiled does not have access to the CA certificates. Symlink the certs/ dir to /etc/ssl/certs then it will work.
@fsdevblog Thanks for raising this and to find a solution!
Optionally, you could install the
openssl
v1 provided with the PPA:sudo apt install openssl1.0
E: Unable to locate package openssl1.0 E: Couldn't find any package by glob 'openssl1.0'
@diogeneshas The package is available only if you added the PPA, but it'll not help on this case, as the required version is 1.1
Issue on parent repo: https://github.com/rvm/rvm/issues/5209
@fsdevblog I just updated your solution to use openssl1.1 version n
(instead of version c
) and added steps to link to /etc/ssl/certs
.
Ok, finally I've backported openssl1.1
to 22.04 for those using the PPA.
You want, after sudo apt update
, downgrade packages with:
sudo apt install libssl-dev=1.1.1l-1ubuntu1.4 openssl=1.1.1l-1ubuntu1.4
@raelgc Thanks for the tip, it worked well for me :+1:
Great work here - thank you!
Ok, finally I've backported
openssl1.1
to 22.04 for those using the PPA.You want, after
sudo apt update
, downgrade packages with:sudo apt install libssl-dev=1.1.1l-1ubuntu1.4 openssl=1.1.1l-1ubuntu1.4
Is there any way to block libssl-dev and openssl from updating? Because they are always updated and it is necessary to keep downgrading again!
@mpetri-wert, 3 possible solutions:
apt
Warning: This can lead to some problems during upgrade. Run at your own risk!
Hold a package: sudo apt-mark hold <package-name>
Remove the hold: sudo apt-mark unhold <package-name>
Show all packages on hold: sudo apt-mark showhold
Use the above solution in comment https://github.com/rvm/ubuntu_rvm/issues/67#issuecomment-1107065230 (I keep updating it to point to the latest SSL 1.1.1 build)
Few days ago I've built and uploaded a binary for Ruby 3.1.3, which appears to works fine in Ubuntu 22.04
. Try the default install command: rvm install 3.1.3
.
a little correction to the script above. it should be:
$ sudo rmdir /usr/local/ssl/certs
$ sudo ln -sf /etc/ssl/certs/ /usr/local/ssl/certs
with all the respect possible this defect was not fixed before it was closed as I'm still not able to install Ruby 2.6.2 on Ubuntu 22.04.2 LTS
Description
Problem installing Ruby 2.6.9 with RVM on freshly released Ubuntu 22.04 final version (downloaded and installed 4/22).
Steps to reproduce
Expected behavior
Ruby 2.6.9 installed
Actual behavior
Just like Readme:
Environment info
make-log.txt