web-dev-qa-db-fra.com

(K) Ubuntu 16.04 ne peut pas installer les dépendances non satisfaites du serveur mysql

Lorsque j'essaie de Sudo apt-get install mysql-server je continue à avoir l'erreur suivante:

    The following packages have unmet dependencies:
 mysql-server : Depends: mysql-community-server (= 5.7.12-1ubuntu15.10) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

et n'ont aucune idée de comment y faire face

Quand j'essaie d'installer mysql-community-server, je reçois:

    The following packages have unmet dependencies:
 mysql-community-server : Depends: mysql-client (= 5.7.12-1ubuntu15.10) but it is not going to be installed
                          Depends: libmecab2v5 (>= 0.996-1.1ubuntu1)
E: Unable to correct problems, you have held broken packages.

Et ensuite, lors de l'installation de mysql-client:

    Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  mysql-common mysql-community-client
The following packages will be REMOVED:
  mysql-client-core-5.7
The following NEW packages will be installed:
  mysql-client mysql-community-client
The following packages will be upgraded:
  mysql-common
1 upgraded, 2 newly installed, 1 to remove and 11 not upgraded.
Need to get 0 B/7705 kB of archives.
After this operation, 32,4 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
(Reading database ... 177480 files and directories currently installed.)
Preparing to unpack .../mysql-common_5.7.12-1ubuntu15.10_AMD64.deb ...
Unpacking mysql-common (5.7.12-1ubuntu15.10) over (5.7.12-0ubuntu1) ...
dpkg: error processing archive /var/cache/apt/archives/mysql-common_5.7.12-1ubuntu15.10_AMD64.deb (--unpack):
 trying to overwrite '/usr/share/mysql/russian/errmsg.sys', which is also in package mysql-server-core-5.7 5.7.12-0ubuntu1
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Errors were encountered while processing:
 /var/cache/apt/archives/mysql-common_5.7.12-1ubuntu15.10_AMD64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Après avoir exécuté dpkg -l | grep mysql je reçois:

ii  akonadi-backend-mysql                           4:15.12.3-0ubuntu6                         all          MySQL storage backend for Akonadi
ii  libmysqlclient20:AMD64                          5.7.12-0ubuntu1                            AMD64        MySQL database client library
ii  libqt4-sql-mysql:AMD64                          4:4.8.7+dfsg-5ubuntu2                      AMD64        Qt 4 MySQL database driver
ii  libqt5sql5-mysql:AMD64                          5.5.1+dfsg-16ubuntu7                       AMD64        Qt 5 MySQL database driver
ii  mysql-apt-config                                0.7.2-1                                    all          Auto configuration for MySQL APT Repo.
ii  mysql-client-core-5.7                           5.7.12-0ubuntu1                            AMD64        MySQL database core client binaries
ii  mysql-common                                    5.7.12-0ubuntu1                            all          MySQL database common files, e.g. /etc/mysql/my.cnf
ii  mysql-server-core-5.7                           5.7.12-0ubuntu1                            AMD64        MySQL database server binaries
4
Jakub Kopyś

La réponse est dans les commentaires, mais je pense que cela vaut la peine de le poster ici.

J'ai téléchargé mysql-apt-config_0.7.2-1_all.deb (référentiel MySQL APT - dev.mysql.com/downloads/repo/apt) sur dev.mysql.com et lors de la configuration, j'ai choisi Ubuntu Wily. depuis 16.04 n'était pas sur la liste. Et c'était le problème, Xenial a déjà MySQL 5.7 dans ses dépôts officiels.

Je l'ai corrigé en exécutant Sudo apt-get purge mysql-apt-config puis Sudo apt install mysql-server.

Je tiens à souligner que vous devriez remercier fkraiem , pas moi.

4
Jakub Kopyś