Debian

Debian:“dpkg -l”名稱欄位有時包含arch/abi,有時不包含。為什麼?

  • May 17, 2022

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?

FWIW:

$ 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 <team+dns@tracker.debian.org>
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 <team+dns@tracker.debian.org>
Architecture: amd64

再添加一行將顯示相關欄位:

$ 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 <team+dns@tracker.debian.org>
Architecture: amd64
Multi-Arch: same

bind9-libs被標記為“Multi-Arch:same”,這意味著它可以為多個架構例如 amd64i386)共同安裝。對於具有此屬性dpkg的包,顯示體系結構以及包名稱。

bind9-hosts沒有這樣標記,因此它不是可共同安裝的,並且只能存在於一種架構中。

引用自:https://unix.stackexchange.com/questions/702714