我有两台机器,它们以dpkg -l
不同的方式输出不同的东西:第二台只在一台机器上显示“架构”。
如何设置输出语言dpkg
并强制其输出“架构”信息?
1
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 Description
+++-===================================-============================-============
2
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
+++-==================================-=============================-============-============
dpkg-query
看起来是一条有希望的路线:
dpkg-query --show --showformat='${Package} ${Version} ${Architecture} ${Description}\n'
但它返回的信息太多,而且呈现得不太好dpkg -l
:
acpi 1.5-2 amd64 displays information on ACPI devices
Attempts to replicate the functionality of the 'old' apm command on
ACPI systems, including battery and thermal information. Does not support
ACPI suspending, only displays information about ACPI devices.
acpi-support-base 0.137-5 all scripts for handling base ACPI events such as the power button
This package contains scripts to react to various base ACPI events
such as the power button. For more extensive ACPI support, including support
for suspend-to-RAM and for various laptop features, install the package
"acpi-support".
acpid 1:2.0.7-1squeeze4 amd64 Advanced Configuration and Power Interface event daemon
答案1
我的看法(从最后引用的错误消息推断)是你在一台机器上安装了 Wheezy(或 Jessie 或 Sid),而在另一台机器上安装了 Squeeze。
Debian(以及它的dpkg
机器)获得了所谓的“多架构”(能够多次安装同一个包 — 一次针对一个架构,因此,同一个库的i386
构建amd64
可能共存)只存在于 Wheezy 中。这可以解释您观察到的差异。