AWS: Install Erlang/OTP on Amazon Linux

Posted on Jun 11, 2011

I could not find suitable rpms, and since building was sort of a pain, I thought I would put this together. This is not an altogether foreign installation, but there are some tricky dependencies, and a few random devel packages that you need. Start by figuring out the path to the latest source file download, and use wget:

Required Packages Installation

Install the build tools and required libraries.

In case anyone gets to this page while chasing errors (these are particular to amzn-main/amzn-updates repositories, but may be of use for RHEL-based distributions):

  • *openjdk-devel - This avoids the “jinterface : No Java compiler found”, applications disabled message
  • unixODBC-devel - This avoids the “odbc : ODBC library - link check failed”, applications disabled message

Note that the wxWidgets Warning will display, since the primary usage for my Amazon Linux Erlang installation is web services (ejabberd, Zotonic CMS, etc.), I am comfortable ignoring this. If you are installing for local application development, you will likely want to build wxWidgets from source (requires GTK libs), or install the erlang-wx from an rpm or alternative repository (a RHEL6 rpm will likely install without issue).

./configure, make, make install

The latest Erlang/OTP source available is R14B03 - update the directory appropriately as this changes. On a micro instance, configure requires around a minute or two and make took almost 50 minutes.

Use you some erl

Just to be safe give ’erl’ a spin:

You can use Ctrl+G, then ‘q’ or Ctrl+C then ‘a’ to quit the shell.

Now you can get started with Erlang or even “learn you some Erlang (for great good!)”. I plan to try my hand at both.