将 mysql-5.1 升级到 5.5 导致使用 dotdeb 的服务器崩溃:/usr/bin/dpkg 返回错误代码 (1)

将 mysql-5.1 升级到 5.5 导致使用 dotdeb 的服务器崩溃:/usr/bin/dpkg 返回错误代码 (1)

我最近在我的 Debian 上添加了 dotdeb,以便使我的 PHP 保持最新状态

deb ftp://ftp.debian.ikoula.com/debian squeeze main contrib non-free
deb-src ftp://ftp.debian.ikoula.com/debian/ squeeze main contrib non-free
deb http://security.debian.org/ squeeze/updates main contrib non-free
deb-src http://security.debian.org/ squeeze/updates main contrib non-free
deb http://repo.varnish-cache.org/debian/ squeeze varnish-3.0
deb http://packages.dotdeb.org squeeze all
deb-src http://packages.dotdeb.org squeeze all

我 15 分钟前做过

apt-get dist-upgrademysql从更新5.15.5现在我的所有生产 mysql 服务器都崩溃了(无法重新启动):

然后我尝试了 apt-get upgrade 和 apt-get update -f,结果返回:

    The following packages were automatically installed and are no longer required:
  libhtml-template-perl mysql-server-core-5.1 libgd2-xpm
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
  mysql-client-5.5 mysql-client-core-5.5
Suggested packages:
  libterm-readkey-perl
The following packages will be REMOVED:
  mysql-client-5.1
The following NEW packages will be installed:
  mysql-client-5.5 mysql-client-core-5.5
0 upgraded, 2 newly installed, 1 to remove and 0 not upgraded.
1 not fully installed or removed.
Need to get 0 B/10.4 MB of archives.
After this operation, 11.3 MB of additional disk space will be used.
Do you want to continue [Y/n]? Y
(Reading database ... 40695 files and directories currently installed.)
Unpacking mysql-client-core-5.5 (from .../mysql-client-core-5.5_5.5.27-1~dotdeb.0_amd64.deb) ...
dpkg: error processing /var/cache/apt/archives/mysql-client-core-5.5_5.5.27-1~dotdeb.0_amd64.deb (--unpack):

 trying to overwrite '/usr/bin/mysql', which is also in package mysql-client-5.1 5.1.63-0+squeeze1
configured to not write apport reports

    dpkg-deb: subprocess paste killed by signal (Broken pipe)

Errors were encountered while processing:
 /var/cache/apt/archives/mysql-client-core-5.5_5.5.27-1~dotdeb.0_amd64.deb

E: Sub-process /usr/bin/dpkg returned an error code (1)

为什么我会遇到这种情况?谢谢您的帮助。

答案1

我认为它表达的是这个。

它正在尝试升级 mysql-client-core-5.5,后者试图覆盖 /usr/bin/mysql,但它是通过 mysql-client-5.1 包安装的,因此它会失败。

尝试执行以下操作

apt-get remove mysql-client-5.1

这也可能会尝试删除服务器包。为以防万一,请备份 /etc/mysql 目录。

相关内容