Introduction to Erlang : Installing Erlang

About Erlang

Erlang is a functional programming language which has many features more commonly associated with an operating system than with a programming language: concurrent processes, scheduling, memory management, distribution, networking, etc.

The initial open-source Erlang release contains the implementation of Erlang, as well as a large part of Ericsson’s middleware for building distributed high-availability systems.

Installing Erlang

Ubuntu & derivatives

If I am not mistaken, in Ubuntu 10.04+, Erlang system is preinstalled, because it is used by some other subsystems, such as CouchDB database.

In Ubuntu, you can install Erlang from the repositories:

$ sudo apt-get install erlang

The version installed will not be the latest, but this should not bother you for now..

Building from source

You can download Erlang source from here. Untar the downloaded file, nagivate into the folder and run the configure script:

#you can use the --prefix=/path/to/the/installation/folder
#the default is /usr/local/lib/erlang
$ ./configure

If no problems appear, run:

$ make

and then

#as the root user, or "sudo make install"
$ make install

Windows

Download and run the installer.

Accessing the Erlang Emulator

Erlang Emulator is an interactive shell which you can use to test and run your code.

Erlang Emulator

Erlang Emulator


In order to get access to the emulator do:

Linux, Mac OS X, and Unix

Open a terminal and type:

$ erl
Windows

You can either click the Erlang icon created by the installer or run the werl command.

Quit

In order to exit the emulator type

1> q().

Programming Editor/IDE

Emacs

I personally use Emacs for programming Erlang. There is an Erlange editing mode in Emacs. In Ubuntu you can install it by:

sudo apt-get install erlang-mode

Details here.

Erlide for Eclipse

There is an Eclipse plugin supporting Erlang called Erlide. For download and installation details go here.

Others

There are some other alternatives, including a Netbeans IDE plugin. For more details go here.

Documentation

You can access Erlang Documentation online.

What I use the most is the Manual Pages. It is a very useful resource since there are tons of built-in function that will help you avoid reinventing the wheel..

Next

The next post will be about the basic types in Erlang..

Series NavigationIntroduction to Erlang post seriesIntroduction to Erlang : Typing

Leave a Reply

*

Posts’ Calendar
March 2011
M T W T F S S
 123456
78910111213
14151617181920
21222324252627
28293031