
sudo apt-get purge mysql-client-8.0 mysql-server-8.0 mysql-server-core-8.0
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Package 'mysql-client-8.0' is not installed, so not removed
Package 'mysql-server-8.0' is not installed, so not removed
Package 'mysql-server-core-8.0' is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
sudo apt-get autoremove sudo apt-get autoclean
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Del thermald 2.4.9-1ubuntu0.3 [222 kB]
sudo apt-get install mysql-server
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:
mysql-common : Conflicts: mysql-server-8.0 but 8.0.34-0ubuntu0.22.04.1 is to be installed
mysql-server-8.0 : Depends: mysql-client-8.0 (>= 8.0.34-0ubuntu0.22.04.1) but it is not installable
Depends: mysql-server-core-8.0 (= 8.0.34-0ubuntu0.22.04.1) but it is not installable
E: Unable to correct problems, you have held broken packages.
Tengo dependencias no satisfechas aunque estén eliminadas. No lo entiendo.
¡Gracias!
EDITAR:
He reinstalado una instantánea antigua para mantener mis sitios en línea. Entonces las versiones anteriores de mysql8.0 se instalan nuevamente. Obtengo dependencias insatisfechas.
apt policy mysql-common
mysql-common:
Installed: 8.0.33-1ubuntu18.04
Candidate: 8.0.33-1ubuntu18.04
Version table:
*** 8.0.33-1ubuntu18.04 500
500 http://repo.mysql.com/apt/ubuntu bionic/mysql-8.0 amd64 Packages
100 /var/lib/dpkg/status
5.8+1.0.8 500
500 http://mirrors.digitalocean.com/ubuntu jammy/main amd64 Packages
dpkg -l | grep mysql
ii dbconfig-mysql 2.0.21 all dbconfig-common MySQL/MariaDB support
ii mysql-apt-config 0.8.24-1 all Auto configuration for MySQL APT Repo.
ii mysql-client 8.0.33-1ubuntu18.04 amd64 MySQL Client meta package depending on latest version
ii mysql-common 8.0.33-1ubuntu18.04 amd64 Common files shared between packages
ii mysql-community-client 8.0.33-1ubuntu18.04 amd64 MySQL Client
ii mysql-community-client-core 8.0.33-1ubuntu18.04 amd64 MySQL Client Core Binaries
ii mysql-community-client-plugins 8.0.33-1ubuntu18.04 amd64 MySQL Client plugin
ii mysql-community-server 8.0.33-1ubuntu18.04 amd64 MySQL Server
ii mysql-community-server-core 8.0.33-1ubuntu18.04 amd64 MySQL Server Core Binaires
ii mysql-server 8.0.33-1ubuntu18.04 amd64 MySQL Server meta package depending on latest version
rc mysql-server-5.7 5.7.33-0ubuntu0.18.04.1 amd64 MySQL database server binaries and system database setup
ii php-mariadb-mysql-kbs 1.2.12-1 all Knowledge base about MariaDB and MySQL server variables
ii php-mysql 2:8.1+92ubuntu1 all MySQL module for PHP [default]
ii php8.1-mysql 8.1.2-1ubuntu2.13 amd64 MySQL module for PHP
sudo apt update
Hit:1 http://repo.mysql.com/apt/ubuntu bionic InRelease
Hit:2 http://security.ubuntu.com/ubuntu jammy-security InRelease
Hit:3 https://repos.insights.digitalocean.com/apt/do-agent main InRelease
Get:4 http://mirrors.digitalocean.com/ubuntu jammy InRelease [270 kB]
Hit:5 https://updates.signal.org/desktop/apt xenial InRelease
Hit:6 http://mirrors.digitalocean.com/ubuntu jammy-updates InRelease
Hit:7 http://mirrors.digitalocean.com/ubuntu jammy-backports InRelease
Fetched 270 kB in 1s (390 kB/s)
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
2 packages can be upgraded. Run 'apt list --upgradable' to see them.
apt list --upgradable
Listing... Done
mysql-client/jammy-updates,jammy-security 8.0.34-0ubuntu0.22.04.1 amd64 [upgradable from: 8.0.33-1ubuntu18.04]
mysql-server/jammy-updates,jammy-security 8.0.34-0ubuntu0.22.04.1 amd64 [upgradable from: 8.0.33-1ubuntu18.04]
apt install mysql-client mysql-server
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:
mysql-common : Conflicts: mysql-client-8.0 but 8.0.34-0ubuntu0.22.04.1 is to be installed
Conflicts: mysql-client-core-8.0 but 8.0.34-0ubuntu0.22.04.1 is to be installed
mysql-server : Depends: mysql-server-8.0 but it is not installable
E: Unable to correct problems, you have held broken packages.
¡Gracias!
Respuesta1
Para la primera restauraciónrepositorio predeterminadopara jammy.
Identificarse con
grep -r deb /etc/apt/sources.list /etc/apt/sources.list.d/
donde este repositorio repositorio.mysql.comestá activo y elimínelo.
sudo apt -s purge $(dpkg -l | grep mysql | awk '{print $2}')
Esta es primero una simulación. Para la eliminación completa.
sudo apt purge $(dpkg -l | grep mysql | awk '{print $2}')
caché de paquetes refrescante.
sudo apt update
Vuelva a intentarlo.