using asdf
to install erlang
:
asdf install erlang 19.3
but I got:
APPLICATIONS DISABLED (See: /home/pastleo/.asdf/plugins/erlang/kerl-home/builds/asdf_19.3/otp_build_19.3.log)
* crypto : No usable OpenSSL found
* odbc : ODBC library - link check failed
* ssh : No usable OpenSSL found
* ssl : No usable OpenSSL found
the build can still finish though, I encounter no ssl error when installing rebar3
and dependencies...
according to asdf OpenSSL on ArchLinux wiki, erlang can only use openssl 1.0, and now archlinux is using openssl 1.1 (2018/8/16), we need to build our own 1.0. However, the wiki is a little outdated, I did some research from this post and kerl to get it working, here is my step by step:
# make openssl lib dir
mkdir -p $HOME/.asdf/installs/openssl/1.0
# build and install openssl under asdf folder
cd $HOME/.asdf/tmp
git clone https://github.com/openssl/openssl.git --branch OpenSSL_1_0_2-stable
cd openssl
./config --prefix=$HOME/.asdf/installs/openssl/1.0 shared -fPIC
make depend && make && make install
# build and install erlang with special ssl path
KERL_CONFIGURE_OPTIONS="--with-ssl=$HOME/.asdf/installs/openssl/1.0" asdf install erlang 19.3
not sure if erlang 20 and later having this issue
thank you!