How To Install Erlang on Linuxmint 18.03

Erlang Installation on Linux Mint 18.03

Erlang is a programming language used to build massively scalable soft real-time systems with requirements for high availability. The Erlang runtime system has built-in support for concurrency, distribution and fault tolerance. In this tutorial, we are going to see about the installation of Erlang on Linux Mint 18.03

Installation

First ensure that you download the necessary packages by using the wget comand.

linuxhelp ~ # wget https://packages.erlang-solutions.com/erlang-solutions_1.0_all.deb 
--2018-12-03 17:25:12--  https://packages.erlang-solutions.com/erlang-solutions_1.0_all.deb
Resolving packages.erlang-solutions.com (packages.erlang-solutions.com)... 31.172.186.53
Connecting to packages.erlang-solutions.com (packages.erlang-solutions.com)|31.172.186.53|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 4992 (4.9K) [application/x-debian-package]
Saving to: ‘erlang-solutions_1.0_all.deb’

erlang-solutions_1.0_al 100%[==============================>]   4.88K  --.-KB/s    in 0.002s  

2018-12-03 17:25:12 (2.05 MB/s) - ‘erlang-solutions_1.0_all.deb’ saved [4992/4992]

Install the downloaded packages with the help of the following command.

linuxhelp ~ # dpkg -i erlang-solutions_1.0_all.deb
Selecting previously unselected package erlang-solutions.
(Reading database ... 223980 files and directories currently installed.)
Preparing to unpack erlang-solutions_1.0_all.deb ...
Unpacking erlang-solutions (1.0) ...
Setting up erlang-solutions (1.0) ...
#deb cdrom:[Linux Mint 18.3 _Sylvia_ - Release amd64 20171124]/ xenial contrib main non-free

Once it is done, you shall proceed with the installation of Erlang. Run the following command for the same purpose.

linuxhelp ~ # apt-get install erlang
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  erlang-asn1 erlang-base erlang-common-test erlang-corba erlang-crypto erlang-debugger
  erlang-dev erlang-dialyzer erlang-diameter erlang-edoc erlang-eldap erlang-erl-docgen
  erlang-et erlang-eunit erlang-gs erlang-ic erlang-inets erlang-megaco erlang-mnesia
  erlang-observer erlang-odbc erlang-os-mon erlang-parsetools erlang-percept
  erlang-public-key erlang-reltool erlang-runtime-tools erlang-snmp erlang-ssh erlang-ssl
.
.
.

Setting up libodbc1:amd64 (2.3.1-4.1) ...
Setting up erlang-odbc (1:18.3-dfsg-1ubuntu3.1) ...
Setting up erlang-os-mon (1:18.3-dfsg-1ubuntu3.1) ...
Setting up erlang-parsetools (1:18.3-dfsg-1ubuntu3.1) ...
Setting up erlang-percept (1:18.3-dfsg-1ubuntu3.1) ...
Setting up erlang-reltool (1:18.3-dfsg-1ubuntu3.1) ...
Setting up erlang-typer (1:18.3-dfsg-1ubuntu3.1) ...
Setting up erlang (1:18.3-dfsg-1ubuntu3.1) ...
Processing triggers for libc-bin (2.23-0ubuntu9) ...

If you want to check the version of your recently installed Erlang application, you need to run the following command.

linuxhelp ~ # erl
Erlang/OTP 18 [erts-7.3] [source] [64-bit] [async-threads:10] [kernel-poll:false]
Eshell V7.3  (abort with ^G)

You can now create a new erlang file with the help of the following command. Create a script in the file. Once it is done, save the file.

linuxhelp ~ # vim linuxhelp.erl
% hello world program
-module(linuxhelp).
-export([start/0]).
start() ->
io:fwrite("Hello World!\n").

Once it is done, compile the your file.

linuxhelp ~ #erlc linuxhelp.erl

After the compilation, run the file by making use of the following command.

linuxhelp ~ # erl -noshell -s linuxhelp start -s init stop
Hello World!

The content in the file is now displayed under the command. With this, the method to install Erlang on Linux Mint 18.03 comes to an end.

FAQ
Q
Where is the source for LEEX (the erlang lexer)?
A
Erlang's libraries provide an Erlang equivalent for YACC called YECC, and also one for LEX called LEEX. Robert Virding maintains a separate LEEX application, which is available via Git on GitHub.
Q
Does Erlang has a pretty printer?
A
If you use the emacs mode (it comes with the open source release, in lib/emacs/erlang.el), you also get a pretty printer just by printing from emacs.
Q
Where do i get the commercial support for Erlang?
A
Many consulting companies provide support and training courses, the most well-known one is Erlang-solutions.com
Q
What is OTP in Erlang?
A
OTP (Open Telecom Platform) is a large collection of libraries for Erlang to do everything from compiling ASN.1 to providing a WWW server. Most projects using "Erlang" are actually using "Erlang/OTP", i.e. the language and the libraries. OTP is also open source.
Q
What is Erlang?
A
Erlang is a general-purpose programming language and runtime environment. Erlang has built-in support for concurrency, distribution and fault tolerance. Erlang is used in several large telecommunication systems from Ericsson. Erlang is available as open source from http://www.erlang.org.