I have an issue with starting my phoenix app.
I recently got a new macbook and migrated everything from the old one using the Migration Assistant.
Now, when I just try to run the app using mix phx.server or even when I try to run mix deps.get I am getting the following error:
20:05:37.788 [error] Unable to load crypto library. Failed with error:
":load_failed, Failed to load NIF library: 'dlopen(/usr/local/Cellar/erlang/20.3.8/lib/erlang/lib/crypto-4.2.2/priv/lib/crypto.so, 2): Library not loaded: /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib
Referenced from: /usr/local/Cellar/erlang/20.3.8/lib/erlang/lib/crypto-4.2.2/priv/lib/crypto.so
Reason: image not found'"
OpenSSL might not be installed on this system.
I have tried to install and link openssl using brew, but it didn’t really seem to work.
It is important to first install OpenSSL before installing Erlang. So you might be able to fix this issue by removing the current version of Erlang and installing it again (since you now have OpenSSL on your machine).
Yesterday I was working on a Ruby project, and was having a few issues updating my version of Ruby and was running some brew commands, and ran brew upgrade at one point. This may have mucked up my erlang install, not sure.