dpkg -l
最近的 Debian bullseye (v11.3) 机器上的(已修剪)输出:
SE Name Version Arch Description
ii bind9-host 1:9.16.27-1~deb11u1 amd64 DNS Lookup Utility
ii bind9-libs:amd64 1:9.16.27-1~deb11u1 amd64 Shared Libraries used by BIND 9
^^^^^
问题:为什么bind9-libs包的名称字段显示架构/abi,而bind9-host的名称字段不显示架构/abi?
前言:
$ dpkg --print-architecture
amd64
$ grep -A6 "Package: bind9-host" /var/lib/dpkg/status
Package: bind9-host
Status: install ok installed
Priority: standard
Section: net
Installed-Size: 376
Maintainer: Debian DNS Team <[email protected]>
Architecture: amd64
$ grep -A6 "Package: bind9-libs" /var/lib/dpkg/status
Package: bind9-libs
Status: install ok installed
Priority: standard
Section: libs
Installed-Size: 3734
Maintainer: Debian DNS Team <[email protected]>
Architecture: amd64
答案1
再添加一行将显示相关字段:
$ grep -A7 "Package: bind9-libs" /var/lib/dpkg/status
Package: bind9-libs
Status: install ok installed
Priority: standard
Section: libs
Installed-Size: 3734
Maintainer: Debian DNS Team <[email protected]>
Architecture: amd64
Multi-Arch: same
bind9-libs
被标记为“Multi-Arch:相同”,这意味着它可以针对多种架构共同安装(例如 amd64
和i386
)。对于具有此属性的包,dpkg
显示体系结构以及包名称。
bind9-hosts
没有这样标记,因此它不可共同安装,并且只能出现在一种体系结构中。