我是 Ubuntu 新手,当我尝试安装新包时,它会要求运行sudo apt-get -f install
命令,当我执行该命令时,我收到以下日志:
temp@temp-desktop:~$ sudo apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following extra packages will be installed:
libgcrypt11
Suggested packages:
rng-tools
The following packages will be upgraded:
libgcrypt11
1 upgraded, 0 newly installed, 0 to remove and 288 not upgraded.
13 not fully installed or removed.
Need to get 0 B/239 kB of archives.
After this operation, 1,024 B of additional disk space will be used.
Do you want to continue? [Y/n] Y
(Reading database ... 199052 files and directories currently installed.)
Preparing to unpack .../libgcrypt11_1.5.3-2ubuntu4.2_amd64.deb ...
Unpacking libgcrypt11:amd64 (1.5.3-2ubuntu4.2) over (1.5.0-3ubuntu2.1) ...
dpkg: error processing archive /var/cache/apt/archives/libgcrypt11_1.5.3-2ubuntu4.2_amd64.deb (--unpack):
trying to overwrite shared '/usr/share/doc/libgcrypt11/changelog.Debian.gz', which is different from other instances of package libgcrypt11:amd64
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Errors were encountered while processing:
/var/cache/apt/archives/libgcrypt11_1.5.3-2ubuntu4.2_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
任何帮助都将不胜感激。提前致谢!
答案1
您可以通过以下方式修复错误:
sudo rm /usr/share/doc/libgcrypt11/*
然后做:
sudo apt-get dist-upgrade