1

When I try to install mariadb-server on Ubuntu 21.04 using:

sudo apt install mariadb-server

It shows this error:

Reading package lists... Done
Building dependency tree       
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: mariadb-server : Depends: mariadb-server-10.3 (>= 1:10.3.31-0ubuntu0.20.04.1) but it is not going to be installed E: Unable to correct problems, you have held broken packages.

Ollie
  • 2,932
pvdboom
  • 11

2 Answers2

0

MariaDB has their own repository with support for 21.04... See the link below.

https://mariadb.com/kb/en/installing-mariadb-deb-files/

Roxana
  • 76
0

You should have a package available in usual repos.

The error message you are getting can stem from various reasons. Things you could try to either overcome the problem or identify the causes are:

  1. sudo apt update prior to installing.
  2. sudo apt autoremove prior to update.
  3. List held packages with dpkg --get-selections | grep hold (or dpkg --get-selections | grep "\<hold$" as per this).
  4. sudo apt-get -f install mariadb-server` to force installation.

Sources

  1. Unable to correct problems, you have held broken packages