Score:0

Cannot upgrade, uninstall, reinstall, install, remove or remove purge MySQL or MariaDB in Ubuntu 20.04

in flag

I'm trying to upgrade MySQL, but can't because of this kind of message:

The following packages have unmet dependencies:
 mysql-server-8.0 : Depends: mysql-server-core-8.0 (= 8.0.31-0ubuntu0.20.04.1) but 8.0.31-0ubuntu0.20.04.2 is to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

That's apt installed list:

libmysqlclient20/xenial-security,now 5.7.33-0ubuntu0.16.04.1 amd64 [installed]
libmysqlclient21/focal-security,now 8.0.31-0ubuntu0.20.04.1 amd64 [installed,upgradable to: 8.0.31-0ubuntu0.20.04.2]
mysql-client-8.0/focal-updates,now 8.0.31-0ubuntu0.20.04.2 amd64 [installed,automatic]
mysql-client-core-8.0/focal-updates,now 8.0.31-0ubuntu0.20.04.2 amd64 [installed,automatic]
mysql-client/focal-security,now 8.0.31-0ubuntu0.20.04.1 all [installed,upgradable to: 8.0.31-0ubuntu0.20.04.2]
mysql-common/focal,now 5.8+1.0.5ubuntu2 all [installed]
mysql-server-8.0/focal-security,now 8.0.31-0ubuntu0.20.04.1 amd64 [installed,upgradable to: 8.0.31-0ubuntu0.20.04.2]
mysql-server-core-8.0/focal-updates,now 8.0.31-0ubuntu0.20.04.2 amd64 [installed,auto-removable]
mysql-server/focal-security,now 8.0.31-0ubuntu0.20.04.1 all [installed,upgradable to: 8.0.31-0ubuntu0.20.04.2]
php-mysql/focal,now 2:7.4+75 all [installed,automatic]
php7.4-mysql/focal-updates,focal-security,now 7.4.3-4ubuntu2.15 amd64 [installed,automatic]

and that's dpkg installed list:

||/ Name                  Version                 Architecture Description
+++-=====================-=======================-============-===================================================================
ii  mysql-client          8.0.31-0ubuntu0.20.04.1 all          MySQL database client (metapackage depending on the latest version)
un  mysql-client-5.7      <none>                  <none>       (no description available)
ii  mysql-client-8.0      8.0.31-0ubuntu0.20.04.2 amd64        MySQL database client binaries
un  mysql-client-core-5.7 <none>                  <none>       (no description available)
ii  mysql-client-core-8.0 8.0.31-0ubuntu0.20.04.2 amd64        MySQL database core client binaries
ii  mysql-common          5.8+1.0.5ubuntu2        all          MySQL database common files, e.g. /etc/mysql/my.cnf
un  mysql-common-5.6      <none>                  <none>       (no description available)
ii  mysql-server          8.0.31-0ubuntu0.20.04.1 all          MySQL database server (metapackage depending on the latest version)
un  mysql-server-5.5      <none>                  <none>       (no description available)
un  mysql-server-5.7      <none>                  <none>       (no description available)
pFR mysql-server-8.0      8.0.31-0ubuntu0.20.04.1 amd64        MySQL database server binaries and system database setup
un  mysql-server-core-5.7 <none>                  <none>       (no description available)
ii  mysql-server-core-8.0 8.0.31-0ubuntu0.20.04.2 amd64        MySQL database server binaries

but I purged all mysql* and libmysql* folders and files from /var/dpkg/lib/info and /var/cache/apt

Any ideas?

Nmath avatar
ng flag
The first error tells you to `Try 'apt --fix-broken install'` Can you add that result to your question?
user535733 avatar
cn flag
Looks like you might not have the `focal-updates` repository enabled.
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.