To install the latest/current versions of erlang (23.0.2) and elixir (1.10.3), follow the instructions below:
Install asdf ( full instructions https://asdf-vm.com/#/core-manage-asdf-vm):
1 |
git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.7.8 |
Add the following two lines in your ~/.bashrc file:
1 2 3 |
# Add asdf version manager . $HOME/.asdf/asdf.sh . $HOME/.asdf/completions/asdf.bash |
Reload/Source your bash file with
1 |
source ~/.bashrc |
Install the erlang plugin
1 |
asdf plugin add erlang |
If you get the following warnings:
1 2 3 4 5 6 7 8 9 |
... Extracting source code Building Erlang/OTP 23.0.2 (asdf_23.0.2), please wait... WARNING: It appears that a required development package 'libssl-dev' is not installed. WARNING: It appears that a required development package 'automake' is not installed. WARNING: It appears that a required development package 'autoconf' is not installed. WARNING: It appears that a required development package 'libncurses5-dev' is not installed. Configure failed. ... |
Install the missing packages:
1 |
sudo apt install libssl-dev automake autoconf libncurses5-dev |
Install latest erlang version:
1 2 3 4 |
asdf install erlang latest ... Erlang/OTP 23.0.2 (asdf_23.0.2) has been successfully built ... |
Set it up globally (if you want):
1 |
asdf global erlang 23.0.2 |
Add elixir plugin:
1 |
asdf plugin add elixir |
Install latest elixir version (1.10.3):
1 |
asdf install elixir latest |
Set it up globally:
1 |
asdf global elixir 1.10.3-otp-23 |
Finally you can also install the latest Phoenix version (1.5.3):
1 |
mix archive.install hex phx_new 1.5.3 |