I’m using WSL (Ubuntu 20.06) with asdf trying to run an Elixir/Phoenix project that has recently updated all of its packages.
My versions are erlang 25.3 and elixir 1.15.4-otp-25. I’m trying to run mix deps.get and the error I get reads: ** (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 have tried installing the mentioned packages, but I get that they are already installed. (erlang-crypto is already the newest version (1:22.2.7+dfsg-1ubuntu0.2). erlang-dev is already the newest version (1:22.2.7+dfsg-1ubuntu0.2). 0 upgraded, 0 newly installed, 0 to remove and 392 not upgraded.
I have ran sudo apt-get purge erlang* in case there were any versions coming from Linux. The error persisted. However, I don’t know if that’s enough to make sure where my Erlang is coming from.
I uninstalled Erlang with ASDF and installed it again. It in fact displayed the disabled applications. What I got was:
Building Erlang/OTP 25.3 (asdf_25.3), please wait...
WARNING: It appears that a required development package 'libssl-dev' is not installed.
WARNING: It appears that a required development package 'libncurses5-dev' is not installed.
APPLICATIONS DISABLED (See: /home/lucas/.asdf/plugins/erlang/kerl-home/builds/asdf_25.3/otp_build_25.3.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
I did have OpenSSL installed (OpenSSL 1.1.1f 31 Mar 2020), though.
Anyhow, upon unistalling Erlang with ASDF again, I ran sudo apt-get install libssl-dev. Installed Erlang one last time and everything worked.