$ sudo apt install build-essential
$ cd ~/Downloads
$ wget https://www.openssl.org/source/openssl-1.1.1g.tar.gz
$ tar zxvf openssl-1.1.1g.tar.gz
$ cd openssl-1.1.1g
$ ./config --prefix=$HOME/.openssl/openssl-1.1.1g --openssldir=$HOME/.openssl/openssl-1.1.1g
$ make
$ make test # you might get a few tests failing but just ignore
$ make install
$ rm -rf ~/.openssl/openssl-1.1.1g/certs
$ ln -s /etc/ssl/certs ~/.openssl/openssl-1.1.1g/certs
$ cd ~
# let us install older rubies now by using RVM. Hurray!
$ rvm install ruby-3.0.4 --with-openssl-dir=$HOME/.openssl/openssl-1.1.1g
Originally posted on - https://blog.chetanmittaldev.com/how-to-install-older-rubies-on-ubuntu-2204-using-rvm
Top comments (0)