Erlang is a programming language and a runtime environment that can be used for general purposes because it supports concurrency, fault tolerance, and distribution. This makes Erlang suitable for distributed, consistent, and concurrent systems like database applications, telecommunication systems, and servers. By nature, it is a functional programming language that executes in a virtual machine named BEAM—Erlang’s virtual machine with a runtime called OTP—or REPL (read-eval-print loop). This feature enables Erlang to produce distributed, fault-tolerant applications with high response time. Erlang encloses several functional programming concepts like higher-order functions, immutability of variables, and anonymous functions.
In this Answer, we’ll discuss the section on installing Erlang on MacOS, Linux, and Windows.
We’ll utilize
On Linux operating systems, most distributions have pre-built Erlang distributions installed, but if we were still installing it manually, we would use the installation commands given under the “Ubuntu or Debian” section. You can append sudo
at the beginning of each command to install as a root user with greater privileges.
For Ubuntu or Debian, we would utilize the commands below. First, we update all the packages and install wget
, a package manager that downloads free software packages over the internet. On line 3, we download the .deb
Erlang file. Then dpkg
, the Debian package manager, installs the Erlang solutions package and makes it known to your system so that the apt-get
package manager can recognize any available distributions and install a specified version amongst the available ones. We update our packages again and then install a specific version of Erlang on our machine. The esl-erlang
is a single bundle of Eralng that encapsulates all the required applications and utilities within a single package.
Run the terminal below and copy and paste the commands above to install Erlang. This will install 25-Erlang/OTP. If we want to install a different version, we’ll use apt-cache policy esl-erlang
to view the available Erlang packages and install the suitable version. The erl -v
command will display the installed version of Erlang.
For Fedora, use the following command.
Installation on Windows is fairly simple because we won’t be utilizing the command line. We can use the Windows installer provided on the official website. Go to the website and download the installer by clicking “Download Windows Installer” button.
Note: If you require the installation of Elixir as well then read How to install Elixir. This might be the case because Elixir runs on Erlang's VM.
Free Resources