web-dev-qa-db-ja.com

Ubuntu 14.04更新時のmysql-client-5.7依存関係の問題:永続的なソリューション?

Sudo apt-get update && Sudo apt-get upgradeを実行すると、mysqlパッケージが原因でパッケージシステムが壊れます。

クライアントと他のすべてのパッケージをアンインストールして、再度インストールしようとしましたが、次のアップデートで問題が発生しました。

これまでのところ、私が見つけた唯一の有効なソリューションは次のとおりです。

mabe@ubuntu:~ $ Sudo apt-get -f install
[Sudo] password for mabe: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following extra packages will be installed:
  mysql-client-5.6
The following packages will be upgraded:
  mysql-client-5.6
1 upgraded, 0 newly installed, 0 to remove and 10 not upgraded.
10 not fully installed or removed.
Need to get 0 B/5,564 kB of archives.
After this operation, 151 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
(Reading database ... 452900 files and directories currently installed.)
Preparing to unpack .../mysql-client-5.6_5.6.30-0ubuntu0.14.04.1_AMD64.deb ...
Unpacking mysql-client-5.6 (5.6.30-0ubuntu0.14.04.1) over (5.6.28-0ubuntu0.14.04.1) ...
dpkg: error processing archive /var/cache/apt/archives/mysql-client-5.6_5.6.30-0ubuntu0.14.04.1_AMD64.deb (--unpack):
 trying to overwrite '/usr/bin/mysql_config_editor', which is also in package libmysqlclient-dev 5.7.12-1ubuntu14.04
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Errors were encountered while processing:
 /var/cache/apt/archives/mysql-client-5.6_5.6.30-0ubuntu0.14.04.1_AMD64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
mabe@ubuntu:~ $ Sudo dpkg -i --force-overwrite /var/cache/apt/archives/mysql-client-5.6_5.6.30-0ubuntu0.14.04.1_AMD64.deb
(Reading database ... 452900 files and directories currently installed.)
Preparing to unpack .../mysql-client-5.6_5.6.30-0ubuntu0.14.04.1_AMD64.deb ...
Unpacking mysql-client-5.6 (5.6.30-0ubuntu0.14.04.1) over (5.6.28-0ubuntu0.14.04.1) ...
dpkg: warning: overriding problem because --force enabled:
dpkg: warning: trying to overwrite '/usr/bin/mysql_config_editor', which is also in package libmysqlclient-dev 5.7.12-1ubuntu14.04
dpkg: warning: overriding problem because --force enabled:
dpkg: warning: trying to overwrite '/usr/share/man/man1/mysql_config_editor.1.gz', which is also in package libmysqlclient-dev 5.7.12-1ubuntu14.04
dpkg: dependency problems prevent configuration of mysql-client-5.6:
 mysql-client-5.6 depends on mysql-client-core-5.6; however:
  Package mysql-client-core-5.6 is not configured yet.

dpkg: error processing package mysql-client-5.6 (--install):
 dependency problems - leaving unconfigured
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
Errors were encountered while processing:
 mysql-client-5.6
mabe@ubuntu:~ $ Sudo apt-get -f 
installReading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 10 not upgraded.
11 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up tzdata (2016d-0ubuntu0.14.04) ...

Current default time zone: 'Europe/Rome'
Local time is now:      Tue Apr 26 09:43:03 CEST 2016.
Universal Time is now:  Tue Apr 26 07:43:03 UTC 2016.
Run 'dpkg-reconfigure tzdata' if you wish to change it.

Setting up libapt-inst1.5:AMD64 (1.0.1ubuntu2.13) ...
Setting up google-chrome-stable (50.0.2661.86-1) ...
Setting up libpcrecpp0:AMD64 (1:8.31-2ubuntu2.3) ...
Setting up libsnmp-base (5.7.2~dfsg-8.1ubuntu3.2) ...
Setting up libsnmp30:AMD64 (5.7.2~dfsg-8.1ubuntu3.2) ...
Setting up mysql-client-core-5.6 (5.6.30-0ubuntu0.14.04.1) ...
Setting up mysql-client-5.6 (5.6.30-0ubuntu0.14.04.1) ...
Setting up mysql-server-core-5.6 (5.6.30-0ubuntu0.14.04.1) ...
Setting up mysql-server-5.6 (5.6.30-0ubuntu0.14.04.1) ...
mysql start/running, process 11619
Setting up tzdata-Java (2016d-0ubuntu0.14.04) ...
Processing triggers for libc-bin (2.19-0ubuntu6.7) ...

更新のたびにSudo dpkg -i --force-overwrite /var/cache/apt/archives/mysql-client-5.6_5.6.30-0ubuntu0.14.04.1_AMD64.debよりも優れた永続的なソリューションがありますか?

よろしくお願いします

apt-cache policy mysql-common libmysqlclient-devの出力

mabe@ubuntu:~/Development/Lumen-etl (development)$ apt-cache policy mysql-common libmysqlclient-dev
mysql-common:
  Installed: 5.7.12-1ubuntu14.04
  Candidate: 5.7.12-1ubuntu14.04
  Version table:
 *** 5.7.12-1ubuntu14.04 0
        500 http://repo.mysql.com/apt//ubuntu/ trusty/mysql-5.7 AMD64 Packages
        100 /var/lib/dpkg/status
     5.5.49-0ubuntu0.14.04.1 0
        500 http://us.archive.ubuntu.com/ubuntu/ trusty-updates/main AMD64 Packages
        500 http://security.ubuntu.com/ubuntu/ trusty-security/main AMD64 Packages
     5.5.35+dfsg-1ubuntu1 0
        500 http://us.archive.ubuntu.com/ubuntu/ trusty/main AMD64 Packages
libmysqlclient-dev:
  Installed: 5.7.12-1ubuntu14.04
  Candidate: 5.7.12-1ubuntu14.04
  Version table:
 *** 5.7.12-1ubuntu14.04 0
        500 http://repo.mysql.com/apt//ubuntu/ trusty/mysql-5.7 AMD64 Packages
        100 /var/lib/dpkg/status
     5.5.49-0ubuntu0.14.04.1 0
        500 http://us.archive.ubuntu.com/ubuntu/ trusty-updates/main AMD64 Packages
        500 http://security.ubuntu.com/ubuntu/ trusty-security/main AMD64 Packages
     5.5.35+dfsg-1ubuntu1 0
        500 http://us.archive.ubuntu.com/ubuntu/ trusty/main AMD64 Packages
1
mabe02

MySQLを提供する2つのリポジトリがあります。公式のUbuntu 14.04のものはMySQL 5.5を提供し、 公式のMySQLのもの は5.7を提供します。これが、5.6パッケージを強制せずに手動でインストールすることができない理由です。5.5または5.7のどちらかを選択することをお勧めします。その場合、次のことを行う必要があります。

  1. 残りの5.6パッケージをすべてアンインストールします。dpkg -l | grep mysqlで見つけることができます。

  2. 5.5を使用する場合は、sources.listからMySQLリポジトリを削除し、5.7パッケージもすべてアンインストールします。

  3. 最後に、必要に応じてmysql-client-5.5またはmysql-client-5.7をインストールします。

2
fkraiem