Elixir is a functional programming language that runs on the Erlang virtual machine, known for its performance, scalability, and fault-tolerance. This tutorial will guide you through the process of installing Elixir on the latest version of Elementary OS.
Before proceeding with the installation process, make sure that your system is up-to-date by running the following command in the terminal:
sudo apt update && sudo apt upgrade
The first step is to install the dependencies required for Elixir, including the Erlang programming language, which is a prerequisite for Elixir. Run the following command to install Erlang from the official repository:
sudo apt install erlang
Once the installation is complete, run the following command to install other dependencies required for Elixir:
sudo apt install build-essential autoconf libncurses5-dev libwxgtk3.0-gtk3-dev libgl1-mesa-dev libglu1-mesa-dev libpng-dev libssh-dev unixodbc-dev xsltproc fop
After installing the dependencies, you can download the latest version of Elixir from the official website https://elixi.re. You can either download the source code or precompiled packages.
If you want to install the latest version of Elixir using the precompiled package, follow these steps:
Go to https://elixi.re and download the latest precompiled package for Linux.
Open a terminal and navigate to the directory where the package is downloaded.
Unpack the package using the following command:
tar xf elixir-x.y.z-precompiled.zip
Replace x.y.z with the version number of the package.
Move the unpacked directory to the /opt directory using the following command:
sudo mv elixir-x.y.z /opt/
Create a symbolic link to the Elixir binary in the /usr/local/bin directory using the following command:
sudo ln -s /opt/elixir-x.y.z/bin/elixir /usr/local/bin/
Verify the installation by running the following command:
elixir --version
You should see the version number of Elixir printed on the terminal.
On the other hand, if you want to install Elixir from source code, follow the steps given below:
Clone the Elixir source code repository using the following command:
git clone https://github.com/elixir-lang/elixir.git
Navigate to the Elixir directory:
cd elixir
Compile the Elixir source code using the following command:
make clean test
Install Elixir by running the following command:
sudo make install
Verify the installation by running the following command:
elixir --version
You should see the version number of Elixir printed on the terminal.
By following either of the above methods, you have successfully installed Elixir on Elementary OS latest. You can now use Elixir to develop scalable and fault-tolerant applications.
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!