Gangmax Blog

Install Elixir on Ubuntu Xenial

From here which introduces how to use “asdf“ to install “Erlang“ and “Elixir“.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# 1. Install dependencies.
sudo apt-get install build-essential git wget libssl-dev libreadline-dev libncurses5-dev zlib1g-dev m4 curl wx-common libwxgtk3.0-dev autoconf
# 2. Install "asdf" and its plugins.
cd ~
git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.3.0
echo '. $HOME/.asdf/asdf.sh' >> ~/.zshrc
echo '. $HOME/.asdf/completions/asdf.bash' >> ~/.zshrc
# Note: if you use "bash", replace "~/.zshrc" with "~/.bashrc" in the commands above.
# 3. In a new terminal, install Erlang and Elixir.
asdf install erlang 20.0
asdf install elixir 1.5.0
# Set them as the global version.
asdf global erlang 20.0
asdf global elixir 1.5.0
# Now you can try "erl" and "iex".

Comments