ubuntu - 'sudo apt-get -f install' 错误

标签 ubuntu installation apt-get

我是 Linux 新手。我安装了 Ubuntu 16.04,但无法在其中安装任何应用程序。错误消息告诉我存在未满足的依赖项并告诉我运行“sudo apt-get -f install”。但是运行它会产生以下错误。

Extracting templates from packages: 100%
Preconfiguring packages ...
(Reading database ... 178237 files and directories currently installed.)
Preparing to unpack .../libasyncns0_0.8-5build1_i386.deb ...
Unpacking libasyncns0:i386 (0.8-5build1) over (0.8-4) ...
dpkg: error processing archive /var/cache/apt/archives/libasyncns0_0.8-5build1_i386.deb (--unpack):
 trying to overwrite shared '/usr/share/doc/libasyncns0/changelog.Debian.gz', which is different from other instances of package libasyncns0:i386
Preparing to unpack .../liblcms2-2_2.6-3ubuntu2_i386.deb ...
Unpacking liblcms2-2:i386 (2.6-3ubuntu2) over (2.2+git20110628-2ubuntu3.1) ...
dpkg: error processing archive /var/cache/apt/archives/liblcms2-2_2.6-3ubuntu2_i386.deb (--unpack):
 trying to overwrite shared '/usr/share/doc/liblcms2-2/copyright', which is different from other instances of package liblcms2-2:i386
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Preparing to unpack .../libogg0_1.3.2-1_i386.deb ...
Unpacking libogg0:i386 (1.3.2-1) over (1.2.2~dfsg-1ubuntu1) ...
dpkg: error processing archive /var/cache/apt/archives/libogg0_1.3.2-1_i386.deb (--unpack):
 trying to overwrite shared '/usr/share/doc/libogg0/copyright', which is different from other instances of package libogg0:i386
Preparing to unpack .../libsamplerate0_0.1.8-8_i386.deb ...
Unpacking libsamplerate0:i386 (0.1.8-8) over (0.1.8-4) ...
dpkg: error processing archive /var/cache/apt/archives/libsamplerate0_0.1.8-8_i386.deb (--unpack):
 trying to overwrite shared '/usr/share/doc/libsamplerate0/changelog.Debian.gz', which is different from other instances of package libsamplerate0:i386
No apport report written because MaxReports is reached already
                                                              Preparing to unpack .../libwrap0_7.6.q-25_i386.deb ...
Unpacking libwrap0:i386 (7.6.q-25) over (7.6.q-21) ...
dpkg: error processing archive /var/cache/apt/archives/libwrap0_7.6.q-25_i386.deb (--unpack):
 trying to overwrite shared '/usr/share/doc/libwrap0/changelog.Debian.gz', which is different from other instances of package libwrap0:i386
No apport report written because MaxReports is reached already
                                                              Processing triggers for man-db (2.7.5-1) ...
Errors were encountered while processing:
 /var/cache/apt/archives/libasyncns0_0.8-5build1_i386.deb
 /var/cache/apt/archives/liblcms2-2_2.6-3ubuntu2_i386.deb
 /var/cache/apt/archives/libogg0_1.3.2-1_i386.deb
 /var/cache/apt/archives/libsamplerate0_0.1.8-8_i386.deb
 /var/cache/apt/archives/libwrap0_7.6.q-25_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

最佳答案

运行以下命令

sudo dpkg -i --force-overwrite/var/cache/apt/archives//var/cache/apt/archives/libasyncns0_0.8-5build1_i386.deb

然后运行

sudo apt-get -f 安装

如果问题仍然存在,重复上述步骤,对每个 dpkg: 错误处理。

关于ubuntu - 'sudo apt-get -f install' 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44575029/

相关文章:

linux - phpinfo 页面 saprfc 模块未显示

proxy - Ubuntu 16.04 apt-get 无法通过代理工作

archlinux - 找不到 Linux apt-get 命令 - 如何在 Arch Linux 中安装软件包?

puppet - 在使用 Puppet 安装其他软件包之前运行 `apt-get update`

ubuntu - 如何在 ubuntu 上保护自签名证书?

c# - 如何在 Ubuntu 上使用 NginX 提供 Blazor 应用程序

php - 无法安装 Laravel 6

installation - 使用 NSIS 将 32 位和 64 位安装程序合并为一个安装程序

linux - 自定义安装目录

json - download.file 错误不支持的 URL 方案