1

I am installing MySQL 8.0 in Ubuntu 20.04, but I am facing an unmet dependencies issue.

First I run the command

wget https://dev.mysql.com/get/mysql-apt-config_0.8.16-1_all.deb

it successfully downloaded the package.

Second command

sudo dpkg -i mysql-apt-config_0.8.16-1_all.deb

This command also successfully ran.

Third command

sudo apt-get update

Fourth command

sudo apt install mysql-client mysql-community-server mysql-server

After this command I am getting these issues.

Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 libmysqlclient21 : Depends: mysql-common (>= 8.0.25-1ubuntu21.04) but 5.8+1.0.5ubuntu2 is installed
                    Depends: mysql-community-client-plugins (= 8.0.25-1ubuntu21.04) but it is not installable
                    Depends: libc6 (>= 2.33) but 2.31-0ubuntu9.1 is installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

I tried with sudo apt --fix-broken install, and this appeared:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... failed.
The following packages have unmet dependencies:
 libmysqlclient21 : Depends: mysql-common (>= 8.0.25-1ubuntu20.04) but 5.8+1.0.5ubuntu2 is installed
                    Depends: mysql-community-client-plugins (= 8.0.25-1ubuntu20.04) but it is not installable
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... failed.
The following packages have unmet dependencies:
 libmysqlclient21 : Depends: mysql-common (>= 8.0.25-1ubuntu20.04) but 5.8+1.0.5ubuntu2 is installed
                    Depends: mysql-community-client-plugins (= 8.0.25-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
E: Unable to correct dependencies
Zanna
  • 70,465
  • "many"? I see one and it has something for you to do ... did you? and how are you trying to install it? your method does not seem to upgrade libc 1st. https://computingforgeeks.com/how-to-install-mysql-8-on-ubuntu/ has a working method – Rinzwind Jun 17 '21 at 19:52
  • i followed the instructions on provided link, but nothing change getting same issue. – Saad Arshad Jun 17 '21 at 20:18
  • Did you try apt --fix-broken install – Dave Stokes Jun 17 '21 at 21:22
  • i tired but facing following issue. Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied) E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root? – Saad Arshad Jun 18 '21 at 06:08
  • Man, when you try apt --fix-broken install, you have to give sudo permissions; otherwise will never work the apt. So, give this, sudo apt --fix-broken install – Niewbie Jun 18 '21 at 07:01
  • i also tried with sudo, but not helpful.following issues occrus.

    Reading package lists... Done Building dependency tree
    Reading state information... Done Correcting dependencies... failed. The following packages have unmet dependencies: libmysqlclient21 : Depends: mysql-common (>= 8.0.25-1ubuntu20.04) but 5.8+1.0.5ubuntu2 is installed Depends: mysql-community-client-plugins (= 8.0.25-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

    – Saad Arshad Jun 18 '21 at 07:05
  • Please [edit] your question and add output of cat /etc/apt/sources.list.d/mysql.list and apt-cache policy mysql-common libmysqlclient21. – Kulfy Jun 18 '21 at 15:55

0 Answers0