![当 dpkg 状态文件中两次提及包时,如何解决依赖性问题?](https://linux22.com/image/1195467/%E5%BD%93%20dpkg%20%E7%8A%B6%E6%80%81%E6%96%87%E4%BB%B6%E4%B8%AD%E4%B8%A4%E6%AC%A1%E6%8F%90%E5%8F%8A%E5%8C%85%E6%97%B6%EF%BC%8C%E5%A6%82%E4%BD%95%E8%A7%A3%E5%86%B3%E4%BE%9D%E8%B5%96%E6%80%A7%E9%97%AE%E9%A2%98%EF%BC%9F.png)
我从 Ubuntu 18.04 升级到了 20.04,现在想重新安装,gnome-control-center
因为它似乎坏了。由于一些问题,我得到了通过 修复损坏软件包的建议apt --fix-broken install
。这失败了,并显示:
dpkg: error processing archive /var/cache/apt/archives/libgcc1_1%3a10.3.0-1ubuntu1~20.04_amd64.deb (--unpack):
package libgcc1:amd64 (1:10.3.0-1ubuntu1~20.04) with field 'Multi-Arch: no' is not co-installable with libgcc1 which has multiple installed instances
Errors were encountered while processing:
/var/cache/apt/archives/libgcc1_1%3a10.3.0-1ubuntu1~20.04_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
建议的解决方案这里不起作用,因为文件/var/lib/dpkg/status
看起来有些不同。
该包libgcc1
似乎在文件中存在两次status
(见下面的摘录)。
在这种情况下,解决方案是什么样的?
Package: libgcc1
Status: deinstall ok config-files
Priority: optional
Section: libs
Installed-Size: 150
Maintainer: Ubuntu Core developers <[email protected]>
Architecture: i386
Multi-Arch: same
Source: gcc-9 (9.1.0-2ubuntu2~14.04.2)
Version: 1:9.1.0-2ubuntu2~14.04.2
Config-Version: 1:9.1.0-2ubuntu2~14.04.2
Depends: gcc-9-base (= 9.1.0-2ubuntu2~14.04.2), libc6 (>= 2.2.4)
Pre-Depends: multiarch-support
Breaks: gcc-4.3 (<< 4.3.6-1), gcc-4.4 (<< 4.4.6-4), gcc-4.5 (<< 4.5.3-2)
Description: GCC support library
Shared version of the support library, a library of internal subroutines
that GCC uses to overcome shortcomings of particular machines, or
special needs for some languages.
Homepage: http://gcc.gnu.org/
Original-Maintainer: Debian GCC Maintainers <[email protected]>
---------------------------------------------
Package: libgcc1
Status: install ok installed
Priority: optional
Section: libs
Installed-Size: 135
Maintainer: Ubuntu Core developers <[email protected]>
Architecture: amd64
Multi-Arch: same
Source: gcc-9 (9.1.0-2ubuntu2~14.04.2)
Version: 1:9.1.0-2ubuntu2~14.04.2
Depends: gcc-9-base (= 9.1.0-2ubuntu2~14.04.2), libc6 (>= 2.14)
Pre-Depends: multiarch-support
Breaks: gcc-4.3 (<< 4.3.6-1), gcc-4.4 (<< 4.4.6-4), gcc-4.5 (<< 4.5.3-2)
Description: GCC support library
Shared version of the support library, a library of internal subroutines
that GCC uses to overcome shortcomings of particular machines, or
special needs for some languages.
Homepage: http://gcc.gnu.org/
Original-Maintainer: Debian GCC Maintainers <[email protected]>