J'ai mis à jour le système il y a quelques jours et après cela, j'ai eu un problème de paquets cassés qui affectait MySQL et plusieurs bibliothèques. Après cela, je peux effectuer des mises à jour, mais pas installer, mettre à niveau, supprimer ou purger les packages, et je ne trouve aucun moyen de résoudre le problème des dépendances brisées.
Je ne sais pas si le problème des dépendances brisées et de MySQL sont directement liés ou non, alors je vais essayer de les décrire séparément.
Premièrement, si j'essaye d'installer un paquet ou de faire une mise à jour, le message suivant s'affiche:
$ Sudo apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these.
The following packages have unmet dependencies:
libsasl2-modules:i386 : Depends: libssl1.0.0:i386 (>= 1.0.0) but it is not installed
skype-bin:i386 : Depends: libssl1.0.0:i386 but it is not installed
E: Unmet dependencies. Try using -f.
Si j'utilise l'option upgrade -f, alors je reçois
$ Sudo apt-get -f upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
Calculating upgrade... Done
The following NEW packages will be installed:
libssl1.0.0:i386
The following packages will be upgraded:
snapd
1 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
3 not fully installed or removed.
Need to get 0 B/5,235 kB of archives.
After this operation, 6,545 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Preconfiguring packages ...
Setting up mysql-common (5.7.12-0ubuntu1.1) ...
update-alternatives: error: alternative path /etc/mysql/my.cnf.fallback doesn't exist
dpkg: error processing package mysql-common (--configure):
subprocess installed post-installation script returned error exit status 2
Errors were encountered while processing:
mysql-common
E: Sub-process /usr/bin/dpkg returned an error code (1)
En regardant avec Synaptic, je vois les paquets cassés suivants
libsasl2-modules;i386
skype-bin:i386
Ici, si j'essaie de supprimer, de réinstaller ou quoi que ce soit que je reçois avec Synaptic toujours le même message d'erreur
E: mysql-common: subprocess installed post-installation script returned error exit status 2
Si j'essaie de configurer MySQL (ce qui est installé théoriquement dans la version la plus récente), alors je reçois ce message:
$ Sudo dpkg --configure -a
Setting up mysql-common (5.7.12-0ubuntu1.1) ...
update-alternatives: error: alternative path /etc/mysql/my.cnf.fallback doesn't exist
dpkg: error processing package mysql-common (--configure):
subprocess installed post-installation script returned error exit status 2
dpkg: dependency problems prevent configuration of mysql-server-5.7:
mysql-server-5.7 depends on mysql-common (>= 5.6.22-1~); however:
Package mysql-common is not configured yet.
mysql-server-5.7 depends on mysql-common (>= 5.5); however:
Package mysql-common is not configured yet.
dpkg: error processing package mysql-server-5.7 (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of mysql-server:
mysql-server depends on mysql-server-5.7; however:
Package mysql-server-5.7 is not configured yet.
dpkg: error processing package mysql-server (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
mysql-common
mysql-server-5.7
mysql-server
Dans la mise à jour de MySQL, quelque chose était vraiment bizarre. Par exemple, rechercher les fichiers my.cnf
, my.cnf.fallback
etc ... j'ai réalisé que les fichiers et leurs dossiers n'existaient plus. J'ignore comment ils disparaissent lors de la mise à niveau.
En essayant de réinstaller MySQL sans espoir, j’ai reçu ce message:
$ Sudo apt-get -f install mysql-common
Reading package lists... Done
Building dependency tree
Reading state information... Done
mysql-common is already the newest version (5.7.12-0ubuntu1.1).
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
libsasl2-modules:i386 : Depends: libssl1.0.0:i386 (>= 1.0.0) but it is not going to be installed
skype-bin:i386 : Depends: libssl1.0.0:i386 but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
Si j'utilise purge pour les désinstaller et recommencer à zéro, j'ai les mêmes problèmes
$ Sudo apt-get purge mysql-common
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
libmysqlclient18 : Depends: mysql-common (>= 5.5) but it is not going to be installed
libmysqlclient18:i386 : Depends: mysql-common:i386 (>= 5.5)
libmysqlclient20 : Depends: mysql-common (>= 5.5) but it is not going to be installed
libsasl2-modules:i386 : Depends: libssl1.0.0:i386 (>= 1.0.0) but it is not going to be installed
mysql-client-5.7 : Depends: mysql-common (>= 5.5) but it is not going to be installed
mysql-server-5.7 : PreDepends: mysql-common (>= 5.5) but it is not going to be installed
Depends: mysql-common (>= 5.6.22-1~) but it is not going to be installed
skype-bin:i386 : Depends: libssl1.0.0:i386 but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
Si je tente apt-get -f install
alors je reçois
$ Sudo apt-get -f install
[Sudo] password for user:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following additional packages will be installed:
libssl1.0.0:i386
The following NEW packages will be installed:
libssl1.0.0:i386
0 upgraded, 1 newly installed, 0 to remove and 1 not upgraded.
3 not fully installed or removed.
Need to get 0 B/949 kB of archives.
After this operation, 3,207 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Preconfiguring packages ...
Setting up mysql-common (5.7.12-0ubuntu1.1) ...
update-alternatives: error: alternative path /etc/mysql/my.cnf.fallback doesn't exist
dpkg: error processing package mysql-common (--configure):
subprocess installed post-installation script returned error exit status 2
Errors were encountered while processing:
mysql-common
E: Sub-process /usr/bin/dpkg returned an error code (1)
Quelqu'un a une idée, que puis-je faire?
Exécutez les commandes suivantes:
mkdir MYSQL
cd MYSQL
Sudo apt-get download mysql-common
ar xvf mysql*
tar xvf dat*
Sudo cp ./etc/mysql/my.cnf.fallback /etc/mysql/my.cnf.fallback
Sudo dpkg -i mysql*deb
cd
Sudo apt-get -f install