Skip to content

Instantly share code, notes, and snippets.

@rickselby
Last active January 31, 2025 11:36
Show Gist options
  • Select an option

  • Save rickselby/48d733603dfdc1a327254a133843e8a8 to your computer and use it in GitHub Desktop.

Select an option

Save rickselby/48d733603dfdc1a327254a133843e8a8 to your computer and use it in GitHub Desktop.

Aim: install ruby 2.5.8 on Ubuntu 24.04

Required up to ruby 3.0.x; 3.1 should be ok...

Install openssl 1

https://deanpcmad.com/2024/installing-older-ruby-versions-on-ubuntu-24-04-and-22-04/

wget https://www.openssl.org/source/openssl-1.1.1w.tar.gz
tar zxvf openssl-1.1.1w.tar.gz
export OPENSSL=$HOME/.openssl/openssl-1.1.1w
cd openssl-1.1.1w
./config --prefix=$OPENSSL --openssldir=$OPENSSL
make
make test
make install
rm -rf $OPENSSL/certs
ln -s /etc/ssl/certs $OPENSSL/certs

Install ruby

Slightly different command for rvm:

rvm install 2.5.8 --with-openssl-dir=$OPENSSL

Install binary

For legacy apps like wkhtmltopdf

https://gist.github.com/joulgs/c8a85bb462f48ffc2044dd878ecaa786

wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.0g-2ubuntu4_amd64.deb
sudo dpkg -i libssl1.1_1.1.0g-2ubuntu4_amd64.deb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment