Erlang Quick Install
Before you can play around with Erlang, you’ll need to get it installed. There is a complete installation guide that covers all the configurations. This guide will give you a simple, minimal installation that will get your first Erlang shell running in no time.
- Install Erlang on Mac OS X
- Install Erlang on Linux
- Install Erlang on Windows
- Precompile package with latest versions
- Compiling Erlang from source
Install Erlang on Mac OS X
Using Homebrew:
brew install erlang
Using MacPorts:
sudo port install erlang
Install Erlang on Linux
Most operating systems have pre-built Erlang distributions in their package management systems.
For Ubuntu/Debian:
sudo apt-get update
sudo apt-get install erlang
For Fedora:
sudo yum install erlang
For FreeBSD
sudo pkg update
sudo pkg install erlang
Install Erlang on Windows
Precompile package with latest versions
Looking for the latest stable release or a previous Erlang version? Erlang Solutions provides a precompiled installation package for OS X, Windows, Ubuntu, Debian, Fedora, CentOS, Raspbian and other platforms. They also provide an enterprise Erlang distribution.
Download from Erlang Solutions
Compiling Erlang from source
You can build Erlang from source on your own, using the Kerl script. Kerl is a script that lets you easily build different versions of Erlang with a few commands.
Download Kerl:
curl -O https://raw.githubusercontent.com/spawngrid/kerl/master/kerl
chmod +x kerl
Choose an available Erlang source release and build it like this (in this case we choose 18.0 and name it mybuild-18.0):
./kerl list releases
./kerl build 18.0 mybuild-18.0
Choose a directory to install, for example ~/erlang-r16b03
./kerl list builds
./kerl install mybuild-18.0 ~/erlang-18.0
Finally, add the directory ~/erlang-18.0/bin to your environment variable $PATH.
export PATH=$PATH:~/erlang-18.0/bin
Done!
Run erl in your terminal to start an Erlang shell:
$ erl
Erlang/OTP 18 [erts-7.0] [source] [64-bit] [smp:8:8] [async-threads:10] [hipe] [kernel-poll:false]Eshell V7.0 (abort with ^G)
1>