Install Ruby 2.3 on Ubuntu 18.04 LTS
2018-05-21
TechUsually you can install Ruby with rbenv and ruby-build for Ubuntu. However, I needed to install older Ruby (2.3.7) and got an error.
Error
Just running rbenv install 2.3.7
stops with "Failed to configure openssl. It will not be installed." , even I've installed libssl-dev package.
Reason
On Ubuntu 18.04, libssl-dev
is openssl 1.1.0, which is not compatible with Ruby 2.3.
Solution
- download openssl-1.0.2o.tar.gz https://www.openssl.org/source/
- unpack,
./config
andmake
CONFIGURE_OPTS='--with-openssl-dir=/home/yhara/bin/openssl-1.0.2o' rbenv install 2.3.7