Wednesday, May 28, 2008

Getting Erlang Going on a Vanilla Ubuntu Install

Before you are able to configure and make Erlang OTP from source, you're going to need to be sure your have the right dependencies installed.  For a vanilla Ubuntu installation, this means:
sudo apt-get install libc6-dev
sudo apt-get install libncurses6-dev
sudo apt-get install m4
sudo apt-get install libssl-dev
sudo apt-get install sun-java6-jdk

The last two aren't strictly necessary, but libssl-dev is the source files the OTP system needs to utilize OpenSSL.  Now, that last dependency on the JDK may seem a bit odd, but the standard makefile for the OTP system tries to build jinterface, an OTP application that enables running an Erlang node in Java.  (As an aside, there is a similar package called twotp that does the same thing for Python.)

Assuming all goes well, you should be able to cd into the source directory (wherever it is you extracted it to when you downloaded it) and execute the following commands in order:
./configure
make
sudo make install

Depending on the permissions to /usr/local/* you may not need elevated privileges, but again this is for a vanilla install.  Now, you should be able to run Erlang.  Next time, I'll have some notes on setting up vim and Emacs for Erlang.

2 comments:

Gleber said...
This comment has been removed by the author.
Gleber said...

Since Debian unstable/sid has the most recent version of Erlang as a source package you may compile it very easily on Ubuntu Hardy (and problably other). An advantage is the following - this package will be managable with aptitude/apt-get/synaptic (and other apt tools). As far as i remember this will also install erlang-mode for Emacs.
I've posted short guide here Building Erlang 12B on Ubuntu Gutsy/Hardy

P.S. Sorry for the deleted post