Install Erlang and Elixir on Debian

I’ve started learning Elixir and wanted to share the steps for reinstalling it in Debian (well, crostini on my chromeos installation but it should be the same for regular Debian too.)

Now these steps are pretty much verbatim if you follow the official Elixir, asdf and asdf-{erlang,elixir} documentation but I want to make sure I have this saved for myself in the future and anyone else who stumbles upon this.

# First start with getting asdf installed

asdf plugin add nodejs https://github.com/asdf-vm/asdf-nodejs.git

# Add asdf to your .bashrc and restart your terminal

. "$HOME/.asdf/asdf.sh"
. "$HOME/.asdf/completions/asdf.bash"

# Next install the Erlang plugin pre-reqs

apt-get -y install build-essential autoconf m4 libncurses5-dev libwxgtk3.0-gtk3-dev libwxgtk-webview3.0-gtk3-dev libgl1-mesa-dev libglu1-mesa-dev libpng-dev libssh-dev unixodbc-dev xsltproc fop libxml2-utils libncurses-dev openjdk-11-jdk

# Install the Erlang asdf plugin and Erlang

asdf plugin add erlang https://github.com/asdf-vm/asdf-erlang.git
asdf install erlang 25.2.2 # The latest version as of this article

# Install Elixir asdf plugin and Elixir

asdf plugin-add elixir https://github.com/asdf-vm/asdf-elixir.git
asdf install elixir 1.14.3-otp-25 # The latest as of this article