如何按描述搜索 Debian 软件包?

8 debian apt search package-management

我想找到与transmission,BitTorrent 客户端相关的包,但找不到如何搜索包描述。

为什么要这样做?

在某些情况下,包名并不明显;例如,传输的远程控制应用程序可以命名为transmission-remote-gtk(较旧的)或transgui(较新的)。两个包的描述都包括传输。对于我这样的不了解用户,如果有一种方法可以查找包描述,他们希望其他包具有不明显的名称,这将是实用的。

在我的系统aptitude search上只查找包名。另一方面,eix -S在 Gentoo 之下。

那么如何在 Debian 下通过描述搜索软件包?(我想我可以浏览所有可用的包和grep结果。我希望有更合适的方法,当然这就是我的问题。)


编辑:通过内置命令列出结果aptitudeapt-cache

正如MarcoMatthewRock所建议的那样,aptitude search '~d<string>'apt-get search。然而,这两个似乎还包括与搜索字符串无关的结果(至少在我的系统上):

# aptitude search '~dtransmission'
p   atlc                          - calculateur de lignes de transmission arbitraires                  
p   atlc:i386                     - calculateur de lignes de transmission arbitraires                  
p   atlc-examples                 - Exemples pour le calculateur de transmission de ligne arbitraire   
p   between                       - game about consciousness and isolation  
p   between:i386                  - game about consciousness and isolation  
p   boinc-app-seti                - SETI@home application for the BOINC client                         
p   boinc-app-seti:i386           - SETI@home application for the BOINC client                         
p   boinc-app-seti-dbg            - debug symbols for SETI@home             
p   boinc-app-seti-dbg:i386       - debug symbols for SETI@home             
p   boinc-app-seti-graphics       - SETI@home application for the BOINC client (with graphics)         
p   boinc-app-seti-graphics:i386  - SETI@home application for the BOINC client (with graphics)         
p   ca-cacert                     - CAcert.org root certificates            
p   cstream                       - general-purpose stream-handling tool similar to dd                 
p   cstream:i386                  - general-purpose stream-handling tool similar to dd                 
p   cycle                         - programme de calendrier pour femme      
...
Run Code Online (Sandbox Code Playgroud)

aptitude

# apt-cache search transmission
between - game about consciousness and isolation
boinc-app-seti - SETI@home application for the BOINC client
boinc-app-seti-dbg - debug symbols for SETI@home
boinc-app-seti-graphics - SETI@home application for the BOINC client (with graphics)
ca-cacert - CAcert.org root certificates
libcollada2gltfconvert-dev - COLLDADA to glTF conversion library -- development
cstream - general-purpose stream-handling tool similar to dd
freedv - Software Defined Radio (SDR)
glfer - program for reception and transmission of QRSS/DFCW signals
libgmetric4j-java - gmetric4j Ganglia metric transmission API
libgnuradio-noaa3.7.5 - gnuradio noaa satellite signals functions
hamfax - Receive/send radio facsimile transmissions with Soundcard/PTC-II
hylafax-server - Flexible client/server fax software - server daemons
hylafax-server-dbg - Debug symbols for the hylafax server
libijs-dev - IJS raster image transport protocol: development files
libijs-doc - IJS raster image transport protocol: documentation
ike-scan - discover and fingerprint IKE hosts (IPsec VPN Servers)
ion - NASA implementation of Delay-Tolerant Networking (DTN)
ion-doc - Interplanetary Overlay Network - examples and documentation
libion-dev - NASA implementation of Delay-Tolerant Networking (DTN) - development files
...
Run Code Online (Sandbox Code Playgroud)

apt-cache. 以上甚至包括与“transmission”或“trans”不匹配的结果。确实很奇怪。

Mat*_*ock 4

使用apt-cache

apt-cache search packagename
Run Code Online (Sandbox Code Playgroud)

这显示了 apt 认为相关的包(其中许多甚至在描述和名称中都不包含包的名称)。

如果您只需要描述或名称中包含 packagename 的包,请使用 grep 进行管道传输:

apt-cache search packagename | grep 'packagename'
Run Code Online (Sandbox Code Playgroud)

但!其他救援工具:

axi-cache search packagename
Run Code Online (Sandbox Code Playgroud)

您可以在此处阅读有关 axi-cache 的更多信息axi-cache按相关性对分数进行排序并显示匹配百分比,因此更有可能为您提供所需的输出。看起来像是我的新替代品apt-cache

axi-cacheapt-xapian 包的一部分