Search code examples
dependencieserlang

Install Erlang 24 on Ubuntu error dependencies


I'm trying to install Erlang with these commands:

wget https://packages.erlang-solutions.com/erlang-solutions_2.0_all.deb
sudo dpkg -i erlang-solutions_2.0_all.deb
sudo apt-get update
sudo apt install esl-erlang=1:24.3.3-1 cmake libsodium-dev libssl-dev build-essential

but this is the output (error) when I launch the last command:

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
build-essential is already the newest version (12.9ubuntu3).
cmake is already the newest version (3.22.1-1ubuntu1.22.04.1).
libssl-dev is already the newest version (3.0.2-0ubuntu1.7).
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 esl-erlang : Depends: libssl1.0.0 but it is not installable or
                       libssl1.0.2 but it is not installable or
                       libssl1.1 but it is not installable
E: Unable to correct problems, you have held broken packages.

How can I fix this?


Solution

  • libssl1.1 is part of OpenSSL 1.1. The reason it is not installable is that Ubuntu 22.04 (Jammy Jellyfish) no longer includes OpenSSL 1.1, only OpenSSL 3.0 (the name of the corresponding package is libssl3).

    Even though Erlang supports OpenSSL 3.0 as of release 24.2, any binary package needs to be linked to the correct OpenSSL version. Looking at the list of packages, the earliest Erlang version in the Erlang Solutions repository specially built for jammy is 25.0.

    If using a newer Erlang release (or an older Ubuntu release) is not an option, you can use the official Ubuntu Erlang package (jammy has 24.2.1) by typing apt install erlang. Alternatively, you can install the specific Erlang release you need using asdf and its Erlang plugin.