Install Erlang, requires old version if libjpeg?


I’m trying to install Erlang using asdf on MacOS Mojave but it fails. I’ve also tried with Erlang 22 with the same issue. This is what the output is:

❯ asdf install erlang
Extracting source code
mv: rename ./otp-OTP- to /Users/linus/.asdf/plugins/erlang/kerl-home/builds/asdf_21.3.8.6/otp_src_21.3.8.6/otp-OTP- Directory not empty
Building Erlang/OTP (asdf_21.3.8.6), please wait...
Build failed.
 CC	../priv/x86_64-apple-darwin18.6.0/
10 warnings generated.
10 warnings generated.
 LD	../priv/x86_64-apple-darwin18.6.0/
ld: file not found: /usr/local/opt/jpeg/lib/libjpeg.8.dylib for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[3]: *** [../priv/x86_64-apple-darwin18.6.0/] Error 1
make[2]: *** [opt] Error 2
make[1]: *** [opt] Error 2
make: *** [libs] Error 2

Please see /Users/linus/.asdf/plugins/erlang/kerl-home/builds/asdf_21.3.8.6/otp_build_21.3.8.6.log for full details.

So, it requires libjpeg8 and I don’t have that. I do have libjpeg9 installed and libjpeg8 isn’t even available through Homebrew anymore.

Do I really have to downgrade libjpeg to install Erlang? It seems a bit weird to me.

Has anyone else had the same issues?

think your wxmac is old/outdated -

what does wx-config --version give you in terminal?

does updating wxmac using homebrew solve it?


That’s it! Thanks! I had 3.0.2 and upgrading to 3.0.4 fixed it.

1 Like