升级mysql导致包损坏

升级mysql导致包损坏

我有 Debian Jessie 和 MySQL 5.6MySQL Debian 存储库。此安装会安装一个 aptsources.list.d条目,之后sudo apt-get install mysql-community-server会询问我是否要安装 MySQL 5.6 还是 5.7。

这个设置已经运行了几个月。

今天我做了一个sudo apt-get update && sudo apt-get upgrade.这引发了一场冲突。以下是我得到的:

Duplicate sources.list entry http://repo.mysql.com/apt//debian/ jessie/mysql-5.6 amd64 Packages (/var/lib/apt/lists/repo.mysql.com_apt__debian_dists_jessie_mysql-5.6_binary-amd64_Packages)
Duplicate sources.list entry http://repo.mysql.com/apt//debian/ jessie/mysql-5.6 i386 Packages (/var/lib/apt/lists/repo.mysql.com_apt__debian_dists_jessie_mysql-5.6_binary-i386_Packages)
You may want to run apt-get update to correct these problems
Reading package lists... Done
W: Duplicate sources.list entry http://repo.mysql.com/apt//debian/ jessie/mysql-5.6 amd64 Packages (/var/lib/apt/lists/repo.mysql.com_apt__debian_dists_jessie_mysql-5.6_binary-amd64_Packages)
W: Duplicate sources.list entry http://repo.mysql.com/apt//debian/ jessie/mysql-5.6 i386 Packages (/var/lib/apt/lists/repo.mysql.com_apt__debian_dists_jessie_mysql-5.6_binary-i386_Packages)
W: You may want to run apt-get update to correct these problems
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... 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:
 libmysqlclient18 : Depends: mysql-common (>= 5.7.5-m15-2debian8)
 mysql-community-client : Depends: mysql-common (= 5.7.12-1debian8)
E: Broken packages

这很奇怪,因为我没有选择MySQL 5.7!为什么这么要求呢。查看 中的 MySQL apt 条目/etc/apt/sources.list.d/mysql.list,它显示为:

### THIS FILE IS AUTOMATICALLY CONFIGURED ###
# You may comment out entries below, but any other modifications may be lost.
# Use command 'dpkg-reconfigure mysql-apt-config' as root for modifications.
deb http://repo.mysql.com/apt//debian/ jessie mysql-apt-config
deb http://repo.mysql.com/apt//debian/ jessie mysql-5.6
deb http://repo.mysql.com/apt//debian/ jessie mysql-5.6 mysql-5.7-dmr mysql-5.7 connector-python-2.0 connector-python-2.1 router-2.0 mysql-utilities-1.5 mysql-tools    
deb-src http://repo.mysql.com/apt//debian/ jessie mysql-5.6

我不明白 5.7 从哪里来,也不明白在那里看到它是否正确。

我还尝试使用 修复 apt 条目sudo dpkg-reconfigure mysql-apt-config,但没有帮助。

有什么想法如何修复这些损坏的软件包吗?


编辑:

评论中要求:

$ apt-cache policy mysql-common libmysqlclient18 mysql-community-client
mysql-common:
  Installed: 5.6.30-1debian8
  Candidate: 5.7.12-1debian8
  Version table:
     5.7.12-1debian8 0
        500 http://repo.mysql.com/apt//debian/ jessie/mysql-5.7 amd64 Packages
     5.7.8-rc-1debian8 0
        500 http://repo.mysql.com/apt//debian/ jessie/mysql-5.7-dmr amd64 Packages
 *** 5.6.30-1debian8 0
        500 http://repo.mysql.com/apt//debian/ jessie/mysql-5.6 amd64 Packages
        100 /var/lib/dpkg/status
     5.5.47-0+deb8u1 0
        500 http://security.debian.org/ jessie/updates/main amd64 Packages
        500 http://httpredir.debian.org/debian/ stable/main amd64 Packages
libmysqlclient18:
  Installed: 5.6.30-1debian8
  Candidate: 5.7.5-m15-2debian8
  Version table:
     5.7.5-m15-2debian8 0
        500 http://repo.mysql.com/apt//debian/ jessie/mysql-5.7-dmr amd64 Packages
 *** 5.6.30-1debian8 0
        500 http://repo.mysql.com/apt//debian/ jessie/mysql-5.6 amd64 Packages
        100 /var/lib/dpkg/status
     5.5.47-0+deb8u1 0
        500 http://security.debian.org/ jessie/updates/main amd64 Packages
        500 http://httpredir.debian.org/debian/ stable/main amd64 Packages
mysql-community-client:
  Installed: 5.6.30-1debian8
  Candidate: 5.7.12-1debian8
  Version table:
     5.7.12-1debian8 0
        500 http://repo.mysql.com/apt//debian/ jessie/mysql-5.7 amd64 Packages
     5.7.8-rc-1debian8 0
        500 http://repo.mysql.com/apt//debian/ jessie/mysql-5.7-dmr amd64 Packages
 *** 5.6.30-1debian8 0
        500 http://repo.mysql.com/apt//debian/ jessie/mysql-5.6 amd64 Packages
        100 /var/lib/dpkg/status
W: Duplicate sources.list entry http://repo.mysql.com/apt//debian/ jessie/mysql-5.6 amd64 Packages (/var/lib/apt/lists/repo.mysql.com_apt__debian_dists_jessie_mysql-5.6_binary-amd64_Packages)
W: Duplicate sources.list entry http://repo.mysql.com/apt//debian/ jessie/mysql-5.6 i386 Packages (/var/lib/apt/lists/repo.mysql.com_apt__debian_dists_jessie_mysql-5.6_binary-i386_Packages)
W: You may want to run apt-get update to correct these problems

答案1

MySQL 的人回复并声明这是一个错误。以下是他们的留言:

你好,

感谢您的报告。这似乎是新版本的 mysql-apt-config 中的一个错误。在 /etc/apt/sources.list.d/mysql.list 文件中,行: deb http://repo.mysql.com/apt//debian/ jessie mysql-5.6 mysql-5.7-dmr mysql-5.7 connector-python-2.0 connector-python-2.1 router-2.0 mysql-utilities-1.5 mysql-tools不应包含条目mysql-5.6 mysql-5.7-dmr mysql-5.7作为解决方法,您可以从该行中删除这些条目,直到我们可以修复该错误。

相关内容