How to Install Elixir on Debian

In this tutorial, we will guide you on how to install Elixir, a powerful and dynamic programming language, on Debian. The release will be installed from the official website of Elixir - https://elixi.re.

Prerequisites

Before you start with the installation process, ensure that you meet the following prerequisites:

  1. A Debian system with a non-root user with sudo privileges
  2. A stable internet connection.

Install Required Dependencies

Firstly, let's ensure that the Debian system is updated with the latest repositories and packages. Open your terminal and execute the following command:

sudo apt update && sudo apt upgrade

To install the required dependencies for Elixir, run the following command:

sudo apt install -y curl wget git make inotify-tools

Install Erlang

Elixir runs on top of the Erlang Virtual Machine, so we need to install Erlang first. Execute the following commands on your terminal to install Erlang:

wget https://packages.erlang-solutions.com/erlang-solutions_2.0_all.deb && sudo dpkg -i erlang-solutions_2.0_all.deb
sudo apt update && sudo apt install -y erlang

Install Elixir

Now that we have installed the dependencies and Erlang let's download and install Elixir 1.11.2 (Latest as of Oct 2020) from the official website of Elixir - https://elixi.re.

wget https://github.com/elixir-lang/elixir/releases/download/v1.11.2/Precompiled.zip
unzip Precompiled.zip -d elixir && sudo mv elixir /usr/local/lib/

You must add the path for elixir to your $PATH variable to run Elixir smoothly.

export PATH=$PATH:/usr/local/lib/elixir/bin

You can add the above command to .bashrc so that it runs automatically on the start of every shell.

Verify Installation

You can verify the installation and check which version of Elixir is installed by running the following command:

elixir -v

The output should be similar to:

Elixir 1.11.2 (compiled with Erlang/OTP 23)

Conclusion

Congratulations! You have successfully installed Elixir on Debian. Now you can start exploring the world of Elixir and utilize its powerful features to develop robust and efficient applications.

Enjoy!

If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!

Alternatively, for the best virtual desktop, try Shells!