4

I am trying to install mariadb-server on ubuntu 22.04 LTS but I am getting an dependency error message related to galera-4 & libssl. How to fix this issue ?

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
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: galera-4 : Depends: libssl1.1 (>= 1.1.1) but it is not installable E: Unable to correct problems, you have held broken packages.

abhijit
  • 163

2 Answers2

3

Ubuntu 22.04 ships with libssl-3.0.2 which does not satisfy MariaDB's dependency requirements. That said, you can download the required library from the Ubuntu servers and install it manually.

Here's how:

  1. Open Terminal (or SSH into the machine if it's a server)
  2. Download the library:
    wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2_amd64.deb
    

  3. Install the package:
    sudo dpkg -i libssl1.1_1.1.1f-1ubuntu2_amd64.deb
    
  4. Get on with your day

From this point, you will be able to install MariaDB without problems. Future updates to MariaDB will likely resolve this dependency issue by using the newer libssl3.x libraries.

matigo
  • 22,138
  • 7
  • 45
  • 75
  • Thanks for the response but the initial error still persists. I tried removing libssl3 but I am getting a bunch of other dependency errors. – abhijit Apr 29 '22 at 05:40
  • 2
    DO NOT remove libssl3, this is an integral part of the core system. Doing so might ruin your installation. – Artur Meinild Aug 09 '22 at 07:30
2

In my case, the issue happened because I'd followed a guide for adding the MariaDB repository, but the repo added was for a different OS.

My issue was fixed by using the MariaDB repo setup script, then installing:

curl -LsS https://r.mariadb.com/downloads/mariadb_repo_setup | sudo bash -s -- \
  --mariadb-server-version="mariadb-10.11" --os-type="ubuntu" --os-version="jammy"

sudo apt install mariadb-server mariadb-client -y

After I did that, the install didn't even need libssl1.1 or libreadline5.

mbomb007
  • 123