我在 Ubuntu 10.04 上自动安装了一个软件包lm-sensors
,但找不到依赖于它的软件包:
$ aptitude show lm-sensors
Package: lm-sensors
New: yes
State: installed
Automatically installed: yes
Version: 1:3.1.2-2
Priority: extra
Section: utils
Maintainer: Ubuntu Developers <[email protected]>
Uncompressed Size: 455k
Depends: sed (>= 4.0.5-1), lsb-base (>= 3.2-13), libc6 (>= 2.3.4), libsensors4
(>= 1:3.1.1), perl
Recommends: fancontrol
Suggests: sensord, read-edid, i2c-tools
Description: utilities to read temperature/voltage/fan sensors
Lm-sensors is a hardware health monitoring package for Linux. It allows you to
access information from temperature, voltage, and fan speed sensors. It works
with most newer systems.
This package contains programs to help you set up and read data from lm-sensors.
Homepage: http://www.lm-sensors.org
$ aptitude search ~Dlm-sensors
p ksensors - lm-sensors frontend for KDE
p sensord - hardware sensor information logging daemon
p wmgtemp - Temperature sensor dockapp for Window Make
p wmtemp - WM dock applet displaying lm_sensors tempe
找不到已安装的 lm-sensors 依赖项。那为什么它还在这里?
?
还有一个问题:如何在表单中搜索模式:
$ sudo aptitude search ?depends(lm-sensors)
bash: syntax error near unexpected token `('
我在这里做错了什么?
答案1
您需要引用或转义最后一个参数。不带引号的括号 ( ... ) 用于在子 shell 中运行命令。例如
aptitude search '?depends(lm-sensors)'
或者
aptitude search \?depends\(lm-sensors\)
(这是一个 shell glob 模式,也应该被转义...但在这种特殊情况下,只有当您运行 时碰巧在当前目录中?
碰巧有一个名为类似名称的文件时,才会产生实际差异)xdepends(lm-sensors)
aptitude search
顺便说一句,aptitude search
不需要 root 权限,并且可以在没有sudo
.
答案2
抱歉,我太笨了。自动包不仅在依赖时生存,而且在预先依赖或推荐或者在某些设置下甚至建议时也生存:
http://algebraicthunk.net/~dburrows/projects/aptitude/doc/en/ch02s02s07.html
问题的第二部分仍然存在:
如何在 中搜索模式?形式:
$ sudo aptitude search ?depends(lm-sensors)
bash: syntax error near unexpected token `('
我在这里做错了什么?