Install Elixir on Ubuntu 22.04

This guide will go through how to Install Elixir on Ubuntu 22.04. Elixir is a dynamic, functional language for building scalable and maintainable applications. The Erlang virtual machine, which powers Elixir, is renowned for building distributed, fault-tolerant systems with low latency. With the help of these features and the Elixir tooling, developers may work efficiently in a variety of fields across various sectors, including web development, embedded applications, data pipelines, and multimedia processing.

How to Install Elixir on Ubuntu 22.04

  • Update your system packages.
sudo apt update
  • Next, let us install Erlang which is required by Elixir to run. Start by adding the Erlang repository to your system using the commands below.
wget https://packages.erlang-solutions.com/erlang-solutions_2.0_all.deb
sudo apt install ./erlang-solutions_2.0_all.deb
  • Update your system to apply changes.
sudo apt update
  • Then install Erlang using the following command.
sudo apt install erlang

Sample output

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
  ca-certificates-java default-jre-headless erlang-asn1
  erlang-base erlang-common-test erlang-crypto erlang-debugger
  erlang-dev erlang-dialyzer erlang-diameter erlang-edoc
  erlang-eldap erlang-erl-docgen erlang-et erlang-eunit
  erlang-examples erlang-ftp erlang-inets erlang-jinterface
  erlang-megaco erlang-mnesia erlang-mode erlang-observer
  erlang-odbc erlang-os-mon erlang-parsetools erlang-public-key
  erlang-reltool erlang-runtime-tools erlang-snmp erlang-src
  erlang-ssh erlang-ssl erlang-syntax-tools erlang-tftp
  erlang-tools erlang-wx erlang-xmerl java-common
  javascript-common libjs-jquery libjs-jquery-metadata
  libjs-jquery-tablesorter libodbc2 libsctp1 libwxbase3.0-0v5
  libwxgtk-webview3.0-gtk3-0v5 libwxgtk3.0-gtk3-0v5
  openjdk-11-jre-headless
Suggested packages:
  default-jre erlang-manpages erlang-doc xsltproc fop
  odbc-postgresql tdsodbc lksctp-tools fonts-dejavu-extra
  fonts-ipafont-gothic fonts-ipafont-mincho fonts-wqy-microhei
  | fonts-wqy-zenhei
The following NEW packages will be installed:
  ca-certificates-java default-jre-headless erlang erlang-asn1
  erlang-base erlang-common-test erlang-crypto erlang-debugger
  erlang-dev erlang-dialyzer erlang-diameter erlang-edoc
  erlang-eldap erlang-erl-docgen erlang-et erlang-eunit
  erlang-examples erlang-ftp erlang-inets erlang-jinterface
  erlang-megaco erlang-mnesia erlang-mode erlang-observer
  erlang-odbc erlang-os-mon erlang-parsetools erlang-public-key
  erlang-reltool erlang-runtime-tools erlang-snmp erlang-src
  erlang-ssh erlang-ssl erlang-syntax-tools erlang-tftp
  erlang-tools erlang-wx erlang-xmerl java-common
  javascript-common libjs-jquery libjs-jquery-metadata
  libjs-jquery-tablesorter libodbc2 libsctp1 libwxbase3.0-0v5
  libwxgtk-webview3.0-gtk3-0v5 libwxgtk3.0-gtk3-0v5
  openjdk-11-jre-headless
0 upgraded, 50 newly installed, 0 to remove and 333 not upgraded.
Need to get 89.4 MB of archives.
After this operation, 300 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
  • To confirm Erlang is installed, run the command below.
erl

Sample output

Erlang/OTP 24 [erts-12.2.1] [source] [64-bit] [smp:2:2] [ds:2:2:10] [async-threads:1] [jit]

Eshell V12.2.1  (abort with ^G)
1>
  • Next, install Elixir using the command below.
sudo apt install elixir

Sample output

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following NEW packages will be installed:
  elixir
0 upgraded, 1 newly installed, 0 to remove and 333 not upgraded.
Need to get 4,379 kB of archives.
After this operation, 6,996 kB of additional disk space will be used.
Get:1 http://ke.archive.ubuntu.com/ubuntu jammy/universe amd64 elixir amd64 1.12.2.dfsg-2.2 [4,379 kB]
Fetched 4,379 kB in 48s (91.5 kB/s)                              
Selecting previously unselected package elixir.
(Reading database ... 204827 files and directories currently insta
lled.)
Preparing to unpack .../elixir_1.12.2.dfsg-2.2_amd64.deb ...
Unpacking elixir (1.12.2.dfsg-2.2) ...
Setting up elixir (1.12.2.dfsg-2.2) ...
Processing triggers for man-db (2.10.2-1) ...
  • Check the version of Exilir installed using the following command.
elixir -v

Sample output

Erlang/OTP 24 [erts-12.2.1] [source] [64-bit] [smp:2:2] [ds:2:2:10] [async-threads:1] [jit]

Elixir 1.12.2 (compiled with Erlang/OTP 24)

Install Phoenix Framework on Ubuntu 22.04

  • That concludes our article on how to install Elixir on Ubuntu 22.04

Read more on Elixir Documentation

Other Tutorials

Install Node.js on Ubuntu 22.04

Install PHP 8 on Rocky Linux 9

Install Java 18 in Ubuntu 22.04

System administrator | Software Developer | DevOps

Leave a Comment