How to Install Elixir on Ubuntu Server Latest

In this tutorial, we will go through the steps to install Elixir which is a functional programming language, on Ubuntu Server. Elixir runs on the Erlang Virtual Machine (VM) and is designed for building scalable and fault-tolerant distributed applications.

Prerequisites

Before we start, it is assumed that you have access to an Ubuntu Server running the latest version and have sudo access to install software packages.

Step 1 – Installing Erlang

Elixir runs on the Erlang VM and requires it to be installed on the server. We will first install Erlang version 24 by following these steps:

  • Update the package lists using the following command:
sudo apt update
  • Install the Erlang package by typing:
sudo apt install erlang -y
  • Verify the installation of Erlang by checking its version:
erl

This should open the Erlang shell where you can type q(). to exit.

Step 2 – Installing Elixir

Now, we can proceed to install Elixir version 1.14 by following these steps:

  • Add the Erlang Solutions package repository to the system:
wget https://packages.erlang-solutions.com/erlang-solutions_2.0_all.deb
sudo dpkg -i erlang-solutions_2.0_all.deb
  • Update the package lists using the following command:
sudo apt update
  • Install the Elixir package by typing:
sudo apt install elixir -y
  • Verify the installation of Elixir by checking its version:
elixir --version

This should display the version number of Elixir installed on the server.

Conclusion

In this tutorial, we learned how to install Elixir on Ubuntu Server. We installed Erlang, added the Erlang Solutions package repository, updated the package lists, and installed Elixir. You are now ready to start exploring the features and benefits of Elixir.