升级发行版时出现 dpkg 错误

升级发行版时出现 dpkg 错误

输入 apt-get upgrade 后输出以下内容。

Reading package lists... Done
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be upgraded:
  manpages
1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/795 kB of archives.
After this operation, 284 kB disk space will be freed.
Do you want to continue [Y/n]? Y
(Reading database ... 24372 files and directories currently installed.)
Preparing to replace manpages 3.27-1 (using .../manpages_3.44-1_all.deb) ...
Unpacking replacement manpages ...
dpkg: error processing /var/cache/apt/archives/manpages_3.44-1_all.deb (--unpack):
 trying to overwrite '/usr/share/man/man1/getent.1.gz', which is also in package libc-bin 2.15-0ubuntu10.11
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Processing triggers for man-db ...
Errors were encountered while processing:
 /var/cache/apt/archives/manpages_3.44-1_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

我正在尝试将 squeeze 升级到 wheezy,我认为我成功了,但升级却导致此错误。可能是什么问题?

答案1

看起来你以不该有的方式弄乱了你的系统包源,现在事情处于非常不一致的状态。

虽然可能需要做很多工作才能恢复,但您永远无法确定系统的持续稳定性。因此,只需安装一个新的操作系统并恢复其中的应用程序和数据即可。

答案2

看起来您(或以前的系统管理员)混合了一些来自 ubuntu 的软件包,并且它与您作为升级的一部分安装的软件包存在文件冲突。

您可以使用以下命令覆盖错误。

dpkg -i --force-overwrite /var/cache/apt/archives/manpages_3.44-1_all.deb

这通常是一件相当安全的事情。尤其是对于手册页这样不重要的东西。

答案3

这修复了它:

aptitude remove libc-bin

导致这种情况发生:

     Keep the following packages at their current version:
1)     libc-bin [2.15-0ubuntu10.11 (now)]

     Downgrade the following packages:
1)     libc-bin [2.15-0ubuntu10.11 (now) -> 2.13-38+deb7u8 (oldstable)]
2)     libc6 [2.15-0ubuntu10.11 (now) -> 2.13-38+deb7u8 (oldstable)]
3)     libc6-i386 [2.15-0ubuntu10.11 (now) -> 2.13-38+deb7u8 (oldstable)]
4)     libxi6 [2:1.7.1.901-1ubuntu1~precise3 (now) -> 2:1.6.1-1+deb7u1 (oldstabl
5)     patch [2.6.1-3ubuntu0.1 (now) -> 2.6.1-3 (oldstable)]

现在一切都已经修复,我可以备份并重新安装操作系统

相关内容