Score:0

Attempting to install mariadb-server on Ubuntu server 21.04 throws an error

cn flag

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.
user535733 avatar
cn flag
Add to your question the complete output of `sudo apt install mariadb-server-10.3`
Score:0
cn flag

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

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

Score:0
pl flag

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
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.