0

since mysql-client and mysql-server got the update to 8.0.33 they are kept back and not upgraded.

The following packages have been kept back:
 mysql-client mysql-server
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.

Installing mysql-client-8.0 und mysql-server-8.0 doesnt work:

[...]
apt install mysql-server-8.0 mysql-client-8.0
[...]
The following packages have unmet dependencies:
 mysql-client-8.0 : Depends: mysql-common (>= 5.5)
 mysql-server-8.0 : PreDepends: mysql-common (>= 5.5)
                    Depends: mysql-common (>= 5.8+1.0.4~)
E: Unable to correct problems, you have held broken packages.
[...]

Und mysql-common has version 8.0.32:

apt-cache policy mysql-common
mysql-common:
  Installed: 8.0.32-1ubuntu18.04
  Candidate: 8.0.32-1ubuntu18.04
  Version table:
 *** 8.0.32-1ubuntu18.04 100
        100 /var/lib/dpkg/status
     5.8+1.0.5ubuntu2 500
        500 http://de.archive.ubuntu.com/ubuntu focal/main amd64 Packages

Any solution without completely deleting and reinstalling everything?

Thanks!

** update1

I'm running 20.04.6 LTS. I've updated it about half a year ago from 18.04 to 20.04.

lsb_release -d
Description:    Ubuntu 20.04.6 LTS

And my apt sources are all from ubuntu.com archives except the php packages (ondrej).

1
  • Welcome to AskUbuntu. I’m seeing two versions of Ubuntu in the output: 18.04 and 20.04. Could you edit your question to include the actual version of Ubuntu that you’re running as well as whether these are stock versions of MySQL that you have installed or whether they’re from a third-party repository? This will make it easier to offer the correct solution 👍🏻
    – matigo
    Commented May 14, 2023 at 11:16

1 Answer 1

0

The packages mysql-client & mysql-server have unmet dependencies and/or is broken.

In order to fix this,

Follow the steps( Requires reinstall of mysql-client and mysql-server and this is what I did to fix this issue in my system)

First fix the unmet dependency problem by using aptitude(package manager)

sudo apt install aptitude

sudo aptitude install mysql-server

sudo aptitude install mysql-client

Accept the confirmation on the last two steps to remove these conflicting packages.

Now both mysql-client andmysql-server will be removed. Perform an update.

sudo apt update && sudo apt upgrade

Install mysql-client:

sudo apt install mysql-client-core-8.0 

Install mysql-server:

sudo apt install mysql-server

Run sudo systemctl start mysql.service.

If it says Failed to start mysql.service: Unit mysql.service is masked.

mysql.service needs to be unmasked using sudo systemctl unmask mysql.service

Now run sudo systemctl start mysql.service again.

Check the status of mysql.service using sudo systemctl status mysql.service

It should display Active: active (running)

This should fix it. Hope it helps!

3
  • 2
    that worked out. Thanks a lot!
    – provil
    Commented May 14, 2023 at 13:37
  • 1
    @provil I'm glad to hear that your issue was resolved successfully! In order to help others who may have a similar problem, please consider marking the solution as accepted. This way, others can benefit from your experience and find a solution more easily. Thank you for sharing your experience with the community! Commented May 14, 2023 at 14:52
  • 1
    I hope now it's correctly flagged :-) Thanks again.
    – provil
    Commented May 15, 2023 at 12:15

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .