Erlang Language Build and Install Erlang/OTP on Ubuntu


The following examples show two main methods for installing Erlang/OTP on Ubuntu.

Method 1 - Pre-built Binary Package

Simply run this command and it will download and install the latest stable Erlang release from Erlang Solutions.

$ sudo apt-get install erlang

Method 2 - Build and Install from Source

Download the tar file:

$ wget

Extract the tar file:

$ tar -zxf otp_src_19.0.tar.gz

Enter the extracted directory and set ERL_TOP to be the current path:

$ cd otp_src_19.0
$ export ERL_TOP=`pwd`

Now before configuring the build, you want to make sure you have all the dependencies you need in order to install Erlang:

Basic dependencies:

$ sudo apt-get install autoconf libncurses-dev build-essential

Other applications dependencies

ApplicationDependency install
HiPE$ sudo apt-get install m4
ODBC$ sudo apt-get install unixodbc-dev
OpenSSL$ sudo apt-get install libssl-dev
wxWidgets$ sudo apt-get install libwxgtk3.0-dev libglu-dev
Documentation$ sudo apt-get install fop xsltproc
Orber and other C++ projects$ sudo apt-get install g++
jinterface$ sudo apt-get install default-jdk

Configure and build:
You can set your own options, or leave it blank to run the default configuration. Advanced configuration and build for Erlang/OTP.

$ ./configure [ options ]
$ make

Testing the build:

$ make release_tests
$ cd release/tests/test_server
$ $ERL_TOP/bin/erl -s ts install -s ts smoke_test batch -s init stop

After running these commands, open $ERL_TOP/release/tests/test_server/index.html with your web browser and check that you don't have any fails. If all tests passed we're ok to continue to the installation.


$ make install