1.I try to run sudo apt upgrade and also dist upgrade, still cannot upgrade, the package still kept back.
sudo apt-get upgrade mysql-server
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
mysql-common : Conflicts: mysql-server-8.0 but 8.0.33-0ubuntu0.22.04.2 is to be installed
mysql-community-client : Conflicts: mysql-server-8.0 but 8.0.33-0ubuntu0.22.04.2 is to be installed
mysql-server-8.0 : Depends: mysql-client-8.0 (>= 8.0.33-0ubuntu0.22.04.2) but it is not installable
Depends: mysql-server-core-8.0 (= 8.0.33-0ubuntu0.22.04.2) but it is not installable
E: Broken packages
2.I read it from ask ubuntu the solutions is to purge and remove mysql-community-client and i get the second error like i paste below, please help.i can't remove or purge mysql-community-client MySQL - Cannot update to 8.0.31 from 8.0.30 at Ubuntu 22.04.1
How can i fix this without losing all mysql database?
sudo apt purge mysql-community-client Reading package lists... Done Building dependency tree... Done Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:
The following packages have unmet dependencies: dbconfig-mysql : Depends: default-mysql-client but it is not going to be installed or virtual-mysql-client E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
mysql-community-client
, installmysql-client
and you'll be fine. – Jos Jul 04 '23 at 19:06mysql-common
,mysql-server-8.0
anddbconfig-mysql
before retrying. Do not purge the server (it may remove your data, I'm not sure). – Jos Jul 04 '23 at 19:16