尝试安装更新时 libperl5 软件包损坏

尝试安装更新时 libperl5 软件包损坏

从今天开始,我无法在 Ubuntu 16.10 台式计算机上进行任何更新。当我尝试运行以下命令时,系统会sudo apt-get update显示:

Building dependency tree       
Reading state information... Done
You might want to run 'apt-get -f install' to correct these.
The following packages have unmet dependencies:
 libsnmp30:i386 : Depends: libperl5.22:i386 (>= 5.22.1) but it is not installed
E: Unmet dependencies. Try using -f.

当我尝试运行时sudo apt-get install -f,它显示:

Get:1 http://archive.ubuntu.com/ubuntu yakkety/main i386 libperl5.22 i386 5.22.2-3 [3,028 kB]
Fetched 3,028 kB in 0s (34.5 MB/s)         
(Reading database ... 336306 files and directories currently installed.)
Preparing to unpack .../libperl5.22_5.22.2-3_i386.deb ...
Unpacking libperl5.22:i386 (5.22.2-3) ...
dpkg: error processing archive /var/cache/apt/archives/libperl5.22_5.22.2-3_i386.deb (--unpack):
 trying to overwrite shared '/usr/share/doc/libperl5.22/changelog.Debian.gz', which is different from other instances of package libperl5.22:i386
Errors were encountered while processing:
 /var/cache/apt/archives/libperl5.22_5.22.2-3_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

有人知道解决这个问题的诀窍吗?我不知道为什么我会有一个 i386 包,因为这是一个 64 位安装:

Linux loup 4.8.0-34-generic #36-Ubuntu SMP Wed Dec 21 17:24:18 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

答案1

评论#3 来自https://bugs.launchpad.net/ubuntu/+source/perl/+bug/1574351有这个解决方法,对我来说非常有效:

sudo rm /usr/share/doc/libperl5.22/changelog.Debian.gz
sudo apt-get install -f

谢谢您,Reuben Firmin,无论您是谁!

相关内容