I want to have two different OpenSSL versions in my OS.
Right now, openssl version -v
returns
OpenSSL 1.1.1f 31 Mar 2020
I want to have OpenSSL 1.0.2 as well, for I need to install Ruby 2.2.10 with rbenv, and for versions under 2.4 it requires an OpenSSL downgrade.
How to install openssl 1.0.2 with default openssl (1.1.1) on Ubuntu 16.04? - I've followed monaye's answer in this thread, and managed to have OpenSSL installed: openssl version -v
OpenSSL 1.0.2l 25 May 2017
but having the OS use OpenSSL might conflict my Ruby 3.0.0 app, because I need to have both ssl versions available. This is why I have updated OpenSSL back to its latest version
rbenv's docs have a solution for this conflict in MacOS:
with Homebrew on macOS
brew install rbenv/tap/openssl@1.0 RUBY_CONFIGURE_OPTS="--with-openssl-dir=$(brew --prefix openssl@1.0)" rbenv install 2.3.8
and I would need something similar in Ubuntu 20.04 - is it possible?
In the rbenv forums, below OpenSSL version compatibility it says:
When building Ruby 2.3 or older, you must ensure that OpenSSL 1.0 is available somewhere on the system and point to it via the --with-openssl-dir configure flag. At the moment, most Linux distributions that come with OpenSSL 1.1 have a separate package for OpenSSL 1.0.
But
RUBY_CONFIGURE_OPTS="--with-openssl-dir=$(brew --prefix openssl@1.0)" rbenv install 2.3.8
Fails: Command 'brew' not found
I am now trying to install brew
– cratag Mar 22 '21 at 15:24Inspect or clean up the working tree at /tmp/ruby-build.20210322123729.48434.WmdkHX Results logged to /tmp/ruby-build.20210322123729.48434.log
– cratag Mar 22 '21 at 15:50