Search code examples
macosinstallationerlangerlang-otperl

installed erlang R16B03 and erlc command not working


I installed erlang from erlang.org using

 wget http://erlang.org/download/otp_src_R16B03.tar.gz

I can see that erlang is successfully installed. However, I am unable to use the erlc command for eg,

 ercl file.erl 
 {"init terminating in do_boot",{undef,[{erl_compile,compile_cmdline,[],[]},{init,start_it,1,[]},{init,start_em,1,[]}]}}

 Crash dump was written to: erl_crash.dump 
 init terminating in do_boot ()

Also, I tried to create a symlink for this new install.

 which erl 
 /usr/local/bin/erl

 ls -al /usr/local/bin/erl
 lrwxr-xr-x  1 sad  admin  45 May 25 12:00 /usr/local/bin/erl -> /Users/sad/erlang/otp_src_R16B03/bin/erl

Please help if there is anything Im missing


Solution

  • You have downloaded the source package, so you need to build and install first. See https://github.com/erlang/otp/blob/maint/HOWTO/INSTALL.md for details. Better yet, download a package already built for your platform. See for instance http://erlangcentral.org/downloads/