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
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:01Reading package lists... Done Building dependency tree
– Saad Arshad Jun 18 '21 at 07:05Reading 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
cat /etc/apt/sources.list.d/mysql.list
andapt-cache policy mysql-common libmysqlclient21
. – Kulfy Jun 18 '21 at 15:55