- Clone de asdf
git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v[latest-version]
- Add the asdf path to your bash/zsh profile
echo ". $HOME/.asdf/asdf.sh" >> ~/.bashrc # or ~/.zshrc
- Update your bash
source ~/.bashrc # or ~/.zshrc
- Install required dependencies
sudo apt update
sudo apt install -y \
autoconf \
automake \
build-essential \
libssl-dev \
libncurses-dev \
unzip \
openjdk-17-jdk
- Add as plugin and install the latest version:
# Install the elixir and erlang plugins
asdf plugin add elixir
asdf plugin add erlang
# Now install erlang
asdf install erlang latest
asdf global erlang latest
# And Elixir
asdf install elixir latest
asdf global elixir latest
# You can check that Elixir is installed with:
elixir -v
mix archive.install hex phx_new