Ubuntu 20.04 LTS - Elixir version update

Hello everyone,

I’ve got a problem that I cannot rectify.

I work on WSL - Windows 10, Ubuntu 20.04 LTS and elixir version is at 1.9.1. When I try to update the elixir to the latest version, I see the message saying something like “elixir is on the latest version”.

Do you guys have any experience around this ?

Any help would be appreciated.
Thanks,

There’s no mystery, Ubuntu 20.04 LTS is quite old (as the name says: Long Term Release) so the Elixir version is quite conservatively set there: Ubuntu – Details of package elixir in focal

I suggest you use asdf if you want to install higher versions, which is what almost everyone is doing anyway. :slight_smile:

4 Likes

You can install a newer version by following the installation guide for Ubuntu or Debian on Installing Elixir - The Elixir programming language

not really. This is the latest version available from the official packages.

$ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 20.04.3 LTS
Release:	20.04
Codename:	focal

$ elixir -v
Erlang/OTP 24 [erts-12.1.5] [source] [64-bit] [smp:2:2] [ds:2:2:10] [async-threads:1] [jit]

Elixir 1.12.2 (compiled with Erlang/OTP 22)

Did you update the repositories listings by running sudo apt update

I have updated them yesterday and the latest versions are OTP24/Elixir 12.2

according to the packages index, the current version of elixir is 1.9.1.dfsg-1.3, there is no newer version in focal-update, nor in focal-backports. Your installed version (OTP24/Elixir 12.2) seems to come from elsewhere.

2 Likes

I was looking for a guide to help get started and found this one:

But another guide here: Installation — nerves v1.10.5 in addition says

It is important to update the versions of hex and rebar used by Elixir, even if you already had Elixir installed.

mix local.hex
mix local.rebar

Is this needed or not?

1 Like

Correct.
Now that i check I installed it with the following commands:

wget https://packages.erlang-solutions.com/erlang-solutions_2.0_all.deb && sudo dpkg -i erlang-solutions_2.0_all.deb
sudo apt update
sudo apt install esl-erlang
sudo apt install elixir
1 Like

I think OP was looking for a solution involving apt-get but if they can utilize your method then that’s a win as well.

1 Like

It is a solution that involves apt,
what is does is to update the repositories.
you can do it manually, as described in Erlang and Elixir Packages Download - Erlang Solutions
I guess both do the same: add the Erlang solutions repository to your registry.

1 Like

Hm, good point. I haven’t worked with Debian for a long time and I forgot that you can install meta .deb-s, namely those that can update the repos. I got used to Ubuntu’s PPAs I suppose. :face_with_hand_over_mouth:

Thanks for the reminder. :slight_smile:

(On a related note, I am just about to give up using normal package managers. Most high-profile distros do a marvelous job but there are always some dark corners (like compiling Erlang with wxWidgets) and I might just go for Dockerized installs by default because the whole thing can get pretty tiring sometimes.)

1 Like

Ohhh the PPAs :face_with_hand_over_mouth:
I totally forgot about those.
You just brought me back in time :sweat:

sudo apt-get update OR upgrade

didn’t lead to anywhere. So what I did was going through the following again;

wget https://packages.erlang-solutions.com/erlang-solutions_2.0_all.deb && sudo dpkg -i erlang-solutions_2.0_all.deb
sudo apt update
sudo apt install esl-erlang
sudo apt install elixir

as in original installation documents.

and now I have

No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 20.04.3 LTS
Release:        20.04
Codename:       focal

Erlang/OTP 24 [erts-12.1.5] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] [jit]

Elixir 1.12.2 (compiled with Erlang/OTP 22)
1 Like