在“dpkg -l”输出中,amd64是指某些软件包而不是其他软件包的含义是什么?

以下是我Ubuntu系统上使用dpkg -l命令的输出结果,
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                            Version                                    Architecture Description
+++-===============================-==========================================-============-===============================================================================
ii  adduser                         3.113+nmu3ubuntu3                          all          add and remove users and groups
ii  apt                             1.0.1ubuntu2.19                            amd64        commandline package manager
ii  apt-utils                       1.0.1ubuntu2.19                            amd64        package management related utility programs
ii  base-files                      7.2ubuntu5.5                               amd64        Debian base system miscellaneous files
ii  base-passwd                     3.5.33                                     amd64        Debian base system master password and group files
ii  bash                            4.3-7ubuntu1.7                             amd64        GNU Bourne Again SHell
ii  bsdutils                        1:2.20.1-5.1ubuntu20.9                     amd64        Basic utilities from 4.4BSD-Lite
ii  busybox-initramfs               1:1.21.0-1ubuntu1                          amd64        Standalone shell setup for initramfs
ii  bzip2                           1.0.6-5                                    amd64        high-quality block-sorting file compressor - utilities
ii  console-setup                   1.70ubuntu8                                all          console font and keymap setup program
ii  coreutils                       8.21-1ubuntu5.4                            amd64        GNU core utilities
ii  cpio                            2.11+dfsg-1ubuntu1.2                       amd64        GNU cpio -- a program to manage archives of files
ii  cron                            3.0pl1-124ubuntu2                          amd64        process scheduling daemon
ii  dash                            0.5.7-4ubuntu1                             amd64        POSIX-compliant shell
ii  debconf                         1.5.51ubuntu2                              all          Debian configuration management system
ii  debconf-i18n                    1.5.51ubuntu2                              all          full internationalization support for debconf
ii  debianutils                     4.4                                        amd64        Miscellaneous utilities specific to Debian
ii  dh-python                       1.20140128-1ubuntu8.2                      all          Debian helper tools for packaging Python libraries and applications
ii  diffutils                       1:3.3-1                                    amd64        File comparison utilities
ii  dmsetup                         2:1.02.77-6ubuntu2                         amd64        Linux Kernel Device Mapper userspace library
ii  dpkg                            1.17.5ubuntu5.8                            amd64        Debian package management system
ii  e2fslibs:amd64                  1.42.9-3ubuntu1.3                          amd64        ext2/ext3/ext4 file system libraries
ii  e2fsprogs                       1.42.9-3ubuntu1.3                          amd64        ext2/ext3/ext4 file system utilities
ii  eject                           2.1.5+deb1+cvs20081104-13.1ubuntu0.14.04.1 amd64        ejects CDs and operates CD-Changers under Linux
ii  file                            1:5.14-2ubuntu3.4                          amd64        Determines file type using "magic" numbers
ii  findutils                       4.4.2-7                                    amd64        utilities for finding files--find, xargs
ii  gcc-4.8-base:amd64              4.8.4-2ubuntu1~14.04.4                     amd64        GCC, the GNU Compiler Collection (base package)
ii  gcc-4.9-base:amd64              4.9.3-0ubuntu4                             amd64        GCC, the GNU Compiler Collection (base package)

在一些软件包名称的末尾,比如e2fslibs:amd64gcc-4.8-base:amd64中,:amd64是什么意思?为什么并非所有软件包都指定了架构?
1个回答

那些在名称中带有:amd64的应用程序,例如zlib1g:amd64,也可以安装它们的:i386对应版本而不会丢失任何内容,并且它们可以共存于系统中。那些在名称中没有指定的应用程序,例如xwayland,如果已安装,则会删除amd64版本并安装i386版本,反之亦然。在架构列中带有all的应用程序意味着该应用程序与i386amd64都兼容,无需安装对应版本。
示例:
$ dpkg -l

ii  xwayland       2:1.19.6-1ub amd64        Xwayland X server
ii  xxd            2:8.0.1453-1 amd64        tool to make (or reverse) a hex d
ii  xz-utils       5.2.2-1.3    amd64        XZ-format compression utilities
ii  xzoom          0.3-24build1 amd64        magnify part of X display, with r
ii  yasm           1.3.0-2build amd64        modular assembler with multiple s
ii  yelp           3.26.0-1ubun amd64        Help browser for GNOME
ii  yelp-xsl       3.20.1-4     all          XSL stylesheets for the yelp help
ii  zenity         3.28.1-1     amd64        Display graphical dialog boxes fr
ii  zenity-common  3.28.1-1     all          Display graphical dialog boxes fr
ii  zip            3.0-11build1 amd64        Archiver for .zip files
ii  zlib1g:amd64   1:1.2.11.dfs amd64        compression library - runtime
ii  zlib1g:i386    1:1.2.11.dfs i386         compression library - runtime
ii  zlib1g-dev:amd 1:1.2.11.dfs amd64        compression library - development

$ sudo apt install xwayland:i386
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  libaudit1:i386 libbz2-1.0:i386 libcap-ng0:i386 libepoxy0:i386
  libfontenc1:i386 libxfont2:i386
The following packages will be REMOVED:
  ubuntu-session xwayland
The following NEW packages will be installed:
  libaudit1:i386 libbz2-1.0:i386 libcap-ng0:i386 libepoxy0:i386
  libfontenc1:i386 libxfont2:i386 xwayland:i386
0 upgraded, 7 newly installed, 2 to remove and 31 not upgraded.
Need to get 1,291 kB of archives.
After this operation, 1,799 kB of additional disk space will be used.
Do you want to continue? [Y/n] ^C


$ sudo apt install zlib1g-dev:i386
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  libc6-dev:i386 linux-libc-dev:i386
Suggested packages:
  glibc-doc:i386
The following NEW packages will be installed:
  libc6-dev:i386 linux-libc-dev:i386 zlib1g-dev:i386
0 upgraded, 3 newly installed, 0 to remove and 31 not upgraded.
Need to get 3,435 kB of archives.
After this operation, 19.8 MB of additional disk space will be used.
Do you want to continue? [Y/n] ^C

希望这能帮到你!

在您的示例中,我们可以看到包不总是可以共存。安装xwayland:i386将会移除之前安装的包xwayland,这些包彼此冲突,无法共存。 - mook765
1@mook765 你错过了一个细节,xwayland已经以amd64的形式安装了,但它的名称不是xwayland:amd64,所以它们不能同时存在。我说过带有:amd或:i386后缀的软件包可以共存,而没有这些后缀的则不能。 - Terrance