How to Install Elixir on Elementary OS Latest

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.

Prerequisites

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

Step 1 – Install Dependencies

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

Step 2 – Install Elixir

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:

  1. Go to https://elixi.re and download the latest precompiled package for Linux.

  2. Open a terminal and navigate to the directory where the package is downloaded.

  3. 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.

  4. Move the unpacked directory to the /opt directory using the following command:

    sudo mv elixir-x.y.z /opt/
    
  5. 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/
    
  6. 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:

  1. Clone the Elixir source code repository using the following command:

    git clone https://github.com/elixir-lang/elixir.git
    
  2. Navigate to the Elixir directory:

    cd elixir
    
  3. Compile the Elixir source code using the following command:

    make clean test
    
  4. Install Elixir by running the following command:

    sudo make install
    
  5. Verify the installation by running the following command:

    elixir --version
    

    You should see the version number of Elixir printed on the terminal.

Conclusion

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!