No usable OpenSSL found...but openssl is installed

I’m working on getting erlang and elixir setup on a new Macbook Pro. I first installed asdf and then used it to install erlang and elixir. But later when I tried to do iex -S mix, I got this error:

** (Mix) The application “crypto” could not be found. This may happen if your Operating System broke Erlang into multiple packages and may be fixed by installing the missing “erlang-dev” and “erlang-crypto” packages

I checked and I do have openssl installed:

% openssl version
LibreSSL 3.3.6

So then I went back to see if I got an error when erlang was being installed. Sure enough:

APPLICATIONS DISABLED (See: /Users/johnneiberger/.asdf/plugins/erlang/kerl-home/builds/asdf_26.1.2/otp_build_26.1.2.log)
 * crypto         : No usable OpenSSL found
 * jinterface     : No Java compiler found
 * odbc           : ODBC library - link check failed
 * ssh            : No usable OpenSSL found
 * ssl            : No usable OpenSSL found

Any idea what the problem might be? Is the version of openssl installed on this Mac incompatible with the erlang installer?


Hello @neiby , maybe asdf/erlang/osx can help. You have to install openssl via brew brew install openssl to get

% openssl version
OpenSSL 3.1.4 ...
1 Like

You can also supply the location of your ssl library as a build parameter to KERL (which asdf uses)

I set up Erlang with the following options:

KERL_CONFIGURE_OPTIONS="--disable-debug --disable-silent-rules --without-javac --enable-shared-zlib --enable-dynamic-ssl-lib --enable-threads --enable-kernel-poll --enable-wx --enable-webview --enable-darwin-64bit --enable-gettimeofday-as-os-system-time --with-ssl=/opt/homebrew/opt/openssl@3" asdf install erlang 25


What version is your erlang OTP? Up until 24.2, erlang requires openssl@1.1

The crypto app in OTP can now be compiled, linked and used with the new OpenSSL 3.0 cryptolib.

I am using openssl 1.1 currently for all of my OTP installs, as I also had problems installing OTP 26.2 with openssl 3.

Thanks, everyone! I installed openssl via Homebrew, then did the following:

export KERL_CONFIGURE_OPTIONS="--without-javac --with-ssl=$(brew --prefix openssl@3)"

Then I reinstalled erlang and all is well. I appreciate the help! At the moment, my system is still using LibreSSL 3.3.6, but KERL will use the other openssl version, so hopefully that will be okay.

1 Like

Interestingly, this also solved another problem I was having with ElixirLS in VSCode. I couldn’t use any version more recent than v0.13.0 or I’d get all sorts of connection errors and it would just crash. But after the steps I took above to fix the openssl issue, ElixirLS is working great.

Two birds with one stone!

1 Like