Created
May 9, 2022 23:28
-
-
Save defaye/47aa2ca29b17e8ec6315c0bc3118abcf to your computer and use it in GitHub Desktop.
Installing Older Ruby Versions on Ubuntu 22.04 with rbenv
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# adapted from https://deanpcmad.com/2022/installing-older-ruby-versions-on-ubuntu-22-04/ | |
mkdir ~/.openssl | |
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/$USER/.openssl/openssl-1.1.1g --openssldir=/home/$USER/.openssl/openssl-1.1.1g | |
make | |
make test | |
make install | |
rm -rf ~/.openssl/openssl-1.1.1g/certs | |
ln -s /etc/ssl/certs ~/.openssl/openssl-1.1.1g/certs | |
# Ruby 3.0 | |
RUBY_CONFIGURE_OPTS=--with-openssl-dir=/home/$USER/.openssl/openssl-1.1.1g rbenv install 3.0.4 | |
# Ruby 2.7 | |
RUBY_CONFIGURE_OPTS=--with-openssl-dir=/home/$USER/.openssl/openssl-1.1.1g rbenv install 2.7.6 | |
# Ruby 2.6 | |
RUBY_CONFIGURE_OPTS=--with-openssl-dir=/home/$USER/.openssl/openssl-1.1.1g rbenv install 2.6.9 | |
# Ruby 2.5 (No Longer Supported) | |
RUBY_CONFIGURE_OPTS=--with-openssl-dir=/home/$USER/.openssl/openssl-1.1.1g rbenv install 2.5.9 | |
# Ruby 2.4 (No Longer Supported) | |
RUBY_CONFIGURE_OPTS=--with-openssl-dir=/home/$USER/.openssl/openssl-1.1.1g rbenv install 2.4.10 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment