There is an issue with openssl < 3.0 and most versions of Erlang
To fix, install openssl into some directory
cd /usr/local/src
sudo mkdir openssl
sudo chown username:staff openssl
cd openssl
git clone git://git.openssl.org/openssl.git
cd openssl
# This checks out the newest old verison
git checkout OpenSSL_1_1_1t
./Configure linux-generic64 --prefix=/usr/local/openssl
make -j$(nproc)
Then try to install erlang again
export KERL_CONFIGURE_OPTIONS="--disable-debug --disable-silent-rules --without-javac --enable-shared-zlib --enable-dynamic-ssl-lib --enable-hipe --enable-sctp --enable-smp-support --enable-threads --enable-kernel-poll --enable-wx --with-ssl=/usr/local/openssl"
asdf install erlang
asdf_22.3.4.9 is not a kerl-managed Erlang/OTP installation
The asdf_22.3.4.9 build has been deleted
Extracting source code
Building Erlang/OTP 22.3.4.9 (asdf_22.3.4.9), please wait...
APPLICATIONS DISABLED (See: /home/username/.asdf/plugins/erlang/kerl-home/builds/asdf_22.3.4.9/otp_build_22.3.4.9.log)
* jinterface : Java compiler disabled by user
* odbc : ODBC library - link check failed
DOCUMENTATION INFORMATION (See: /home/username/.asdf/plugins/erlang/kerl-home/builds/asdf_22.3.4.9/otp_build_22.3.4.9.log)
* documentation :
* xsltproc is missing.
* fop is missing.
* The documentation cannot be built.
Erlang/OTP 22.3.4.9 (asdf_22.3.4.9) has been successfully built
Cleaning up compilation products for
Cleaned up compilation products for under /home/username/.asdf/plugins/erlang/kerl-home/builds