Giter Club home page Giter Club logo

Comments (15)

fsdevblog avatar fsdevblog commented on June 30, 2024 51

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

from ubuntu_rvm.

raelgc avatar raelgc commented on June 30, 2024 23

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

from ubuntu_rvm.

raelgc avatar raelgc commented on June 30, 2024 2

@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

from ubuntu_rvm.

raelgc avatar raelgc commented on June 30, 2024 2

Issue on parent repo: rvm/rvm#5209

from ubuntu_rvm.

MarcusPetri avatar MarcusPetri commented on June 30, 2024 1

@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?

from ubuntu_rvm.

MikkelRBech avatar MikkelRBech commented on June 30, 2024 1

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.

from ubuntu_rvm.

raelgc avatar raelgc commented on June 30, 2024 1

@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.

from ubuntu_rvm.

kidlab avatar kidlab commented on June 30, 2024 1

@raelgc Thanks for the tip, it worked well for me 👍

from ubuntu_rvm.

raelgc avatar raelgc commented on June 30, 2024

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.

from ubuntu_rvm.

diogeneshas avatar diogeneshas commented on June 30, 2024

@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'

from ubuntu_rvm.

DGaffney avatar DGaffney commented on June 30, 2024

Great work here - thank you!

from ubuntu_rvm.

 avatar commented on June 30, 2024

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!

from ubuntu_rvm.

raelgc avatar raelgc commented on June 30, 2024

@mpetri-wert, 3 possible solutions:

Hold upgrade using 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 local SSL source

Use the above solution in comment #67 (comment) (I keep updating it to point to the latest SSL 1.1.1 build)

Upgrade to Ruby 3.1.3

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.

from ubuntu_rvm.

hurricup avatar hurricup commented on June 30, 2024

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

from ubuntu_rvm.

duaneking avatar duaneking commented on June 30, 2024

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

Edit: rvm/rvm#5209

from ubuntu_rvm.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.