J'ai échoué à mettre à jour le serveur MySQL. Voici ce que j'ai essayé:
J'émets d'abord cette commande pour mettre à jour la liste de paquets:
Sudo apt-get update
Ensuite, mettez à niveau par:
Sudo apt-get upgrade
Il montre l'erreur suivante:
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:
mysql-server-5.5 : Depends: mysql-server-core-5.5 (= 5.5.28-0ubuntu0.12.04.2) but 5.5.31-0ubuntu0.12.04.1 is installed
E: Unmet dependencies. Try using -f.
Apparemment, une version plus récente est installée (mais pourquoi? Je n'ai pas installé manuellement). OK, comme il est suggéré, je lance la commande pour tenter de réparer:
Sudo apt-get -f install
Voici la sortie:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following extra packages will be installed:
mysql-server mysql-server-5.5
Suggested packages:
tinyca mailx
The following packages will be upgraded:
mysql-server mysql-server-5.5
2 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.
2 not fully installed or removed.
Need to get 0 B/8889 kB of archives.
After this operation, 64.5 kB of additional disk space will be used.
Do you want to continue [Y/n]? Y
Perl: warning: Setting locale failed.
Perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LC_CTYPE = "UTF-8",
LANG = "en_HK.UTF-8"
are supported and installed on your system.
Perl: warning: Falling back to the standard locale ("C").
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
dpkg: dependency problems prevent configuration of mysql-server-5.5:
mysql-server-5.5 depends on mysql-server-core-5.5 (= 5.5.28-0ubuntu0.12.04.2); however:
Version of mysql-server-core-5.5 on system is 5.5.31-0ubuntu0.12.04.1.
dpkg: error processing mysql-server-5.5 (--configure):
dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
dpkg: dependency problems prevent configuration of mysql-server:
mysql-server depends on mysql-server-5.5; however:
Package mysql-server-5.5 is not configured yet.
dpkg: error processing mysql-server (--configure):
dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
Errors were encountered while processing:
mysql-server-5.5
mysql-server
E: Sub-process /usr/bin/dpkg returned an error code (1)
Ensuite, j'essaie d'utiliser une autre commande suggérée par certaines personnes sur Internet:
Sudo apt-get -f upgrade
La même sortie est produite. À part la réinstallation du serveur MySQL, que puis-je faire d'autre?
en utilisant le serveur Ubuntu 12.04 LTS
C’est ce qui m’est arrivé, mais c’est que, après avoir fait un Sudo apt-get update
, la version la plus récente du mysql-server
n’a pas été mise à jour, mais uniquement du mysql-server-core
. Je suggèrerais d’abord de faire un autre Sudo apt-get update
et d’installer ensuite le paquet
Sudo apt-get install mysql-server
Si cela ne fonctionne pas, réinstallez-le:
Sudo apt-get install --reinstall mysql-server
Et si cela ne fonctionne pas, configurez simplement purge
le package mysql-server-core
package, puis réinstallez mysql-server
.
Sudo apt-get purge mysql-server-core mysql-server-core-5.5
Sudo apt-get install mysql-server
Et si cela ne fonctionne pas, allez-y en fou avec:
Sudo apt-get clean
Sudo apt-get autoclean
Sudo apt-get purge mysql-server*
Sudo apt-get install mysql-server
En dernier recours, je voudrais purger, redémarrer, installer.