Wednesday 12 May 2010

Erlang on Mac OS X 10.6 (Snow Leopard)

This is what I did to install Erlang on my MacBook Pro:
  1. Install the GCC compiler. This is done by installing Xcode, Apple's developer tool set, available for free after registration. It can be found at the Apple ADC.
  2. Install the Apache FOP print formatter. This Java application is needed for building the documentation. This implies that you also need Java. The configuration routine checks for Java SDK 1.5. (or higher). I had Java SDK 1.6 installed.
  3. Get the latest Erlang source, which in my case was a file named otp_src_R13B03.tar. Unarchive the file and follow the instructions:
    $ cd otp_src_R13B03
    $. /configure
    $ make
    $ sudo make install

    Now bring up a terminal and issue the command:

    $ erl
    Erlang R13B03 (erts-5.7.4) [source] [smp:2:2] [rq:2] [async-threads:0] [kernel-poll:false]
    Eshell V5.7.4  (abort with ^G)
    1> 1+2.
    That's it! I am ready to have some Erlang fun.