0

Solved

This question has been asked many times and I have been trying all the solutions I found on askubuntu/stackoverflow/random forum since yesterday but nothing works.

I downloaded a mysql deb bundle from the official website and I followed this official tutorial to install a mysql server but it ended up breaking my apt. Now, any command results in a variation of this message:

The following packages have unmet dependencies: libmysqlclient21 : Depends: mysql-community-client-plugins (= 8.0.28-1ubuntu20.04) but it is not installable mysql-community-client : Depends: mysql-community-client-core (= 8.0.28-1ubuntu20.04) but it is not installable mysql-community-server : Depends: mysql-community-server-core (= 8.0.28-1ubuntu20.04) but it is not installable E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

And apt --fix-broken install outputs this:

Correcting dependencies... failed. The following packages have unmet dependencies: libmysqlclient21 : Depends: mysql-community-client-plugins (= 8.0.28-1ubuntu20.04) but it is not installable mysql-community-client : Depends: mysql-community-client-core (= 8.0.28-1ubuntu20.04) but it is not installable mysql-community-server : Depends: mysql-community-server-core (= 8.0.28-1ubuntu20.04) but it is not installable E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages. E: Unable to correct dependencies

I have tried a lot of commands (dpkg -r, purge, clean, autoremove, autoclean...) but to no avail. Is there a radical way to save my apt without reinstalling Ubuntu?

Any help would be appreciated.

PS: I'm running Ubuntu 20.04

ArnoBen
  • 1
  • 3
  • Hello. You have not said what version of Ubuntu. Have you tried to install the missing modules? A Google search brings up this info. – David Apr 18 '22 at 08:50
  • Thank you for your answer, I have just found out how to fix my problem: a simple "sudo apt-get -f install" worked out. Weird that I didn't try that solution before but at least my pain has ended ! – ArnoBen Apr 18 '22 at 09:43
  • This kind of problem is **expected behavior** when you try to bolt new upstream software onto a two-year-old release of Ubuntu. Users of 20.04 will find it easiest to use a release of mysql from around the same period. For compatibility with newer software, use a newer release of Ubuntu. – user535733 Apr 18 '22 at 12:29

1 Answers1

0

I should have read a bit more. At the end of the tutorial, they state

If you are being warned of unmet dependencies by dpkg, you can fix them using apt-get:

sudo apt-get -f install

And indeed it fixed my problem.

ArnoBen
  • 1
  • 3