Apparently Ubuntu and its newer derivatives come with OpenSSL 3.0 and in this case Ruby versions earlier than 3.1 used OpenSSL 1.1 In this case, the safest option is to follow the user manual and manually compile OpenSSL 1.1. It worked for me too with Pop!_OS and asdf PS: I put the export inside my .zshrc Install the dependencies: ```bash sudo apt install build-essential checkinstall zlib1g-dev ``` Download OpenSSL 1.1.1: ```bash cd ~/Downloads wget https://www.openssl.org/source/openssl-1.1.1n.tar.gz tar xf openssl-1.1.1n.tar.gz ``` Compile it: ```bash cd ~/Downloads/openssl-1.1.1n ./config --prefix=/opt/openssl-1.1.1n --openssldir=/opt/openssl-1.1.1n shared zlib make make test sudo make install ``` Link the system's certs to OpenSSL 1.1.1 directory: ```bash sudo rm -rf /opt/openssl-1.1.1n/certs sudo ln -s /etc/ssl/certs /opt/openssl-1.1.1n ``` Use RUBY_CONFIGURE_OPTS=--with-openssl-dir=/opt/openssl-1.1.1n before the command to install the ruby version: ```bash RUBY_CONFIGURE_OPTS=--with-openssl-dir=/opt/openssl-1.1.1n rbenv install 2.7.6 ``` If you want to make this permanent, add this line to you .bashrc or .zshrc file: ```bash export RUBY_CONFIGURE_OPTS="--with-openssl-dir=/opt/openssl-1.1.1n/" ``` Then you don't need to use RUBY_CONFIGURE_OPTS=--with-openssl-dir=/opt/openssl-1.1.1n before the command anymore. Font: https://github.com/rbenv/ruby-build/discussions/1940#discussioncomment-2663209