如何使用命令行搜索debian软件包?


Answers:


30

apt-cache search命令将返回name包名称或描述中包含的所有包:

apt-cache search name

有了软件包名称后,就可以使用apt-cache showapt-cache showpkg命令获取有关软件包的更多详细信息。

apt-cache show package_name
apt-cache showpkg package_name

3
+:apt-cache search --names-only仅搜索软件包名称。
吉超

+:'apt-cache show package_name'显示软件包元数据,例如版本,名称,源,体系结构,大小和'apt-cache showpkg package_name'主要显示版本,以及非常详细的前向/后向依赖关系。
吉超

apt list package_name更容易 apt search query_string如果要在包数据库中搜索给定字符串的所有实例。
尼克5


0

安装aptitude,它们只是aptitude search xyz名称或单行说明中带有xyz的软件包列表。


0

尽管aptitude和apt-cache都能很好地完成工作,但是有一个新手正在筹划中。轴缓存。

axi-cache的工作原理与apt-cache相似,但是适用于类固醇。;)它使用称为xapian的复杂工具来建立索引,然后查询该索引。它也将名为http://wiki.debian.org/Debtags>debtags的内容与索引捆绑在一起。Debtags允许您创建粘贴到Deb程序包的小标签。可以肯定地说,btags是搜索软件包和工具以完成工作的有力方法。

例如,如果您想要Debian中的WebDAV客户端,则可以执行此操作。

axi-cache search protocol::webdav

该搜索在我的机器上产生了该错误;

axi-cache search protocol::webdav
14 results found.
Results 1-14:
100% gstreamer0.10-gnomevfs - GStreamer plugin for GnomeVFS
100% sitecopy - A program for managing a WWW site via FTP, DAV or HTTP
100% davfs2 - mount a WebDAV resource as a regular file system
100% blosxom - light, feature-packed weblog app with plugin extensibility
100% lighttpd-mod-webdav - WebDAV module for lighttpd
100% nd - small command line interface to WebDAV servers
100% cadaver - command-line WebDAV client
100% subversion-tools - Assorted tools related to Subversion
100% libapache2-svn - Subversion server modules for Apache
100% libcommons-vfs-java - Java API for accessing various filesystems
100% subversion - Advanced version control system
100% eldav - interface to the WebDAV servers for Emacs.
100% libhttp-dav-perl - WebDAV client library for Perl, and "dave" CLI client
100% fusedav - filesystem to mount WebDAV shares
More terms: webdav servers authoring versioning files subversion remote
More tags: network::client protocol::http role::program implemented-in::c interface::commandline protocol::ftp devel::rcs

如您所见,出现了很多工具,如果您不确定自己要寻找的是什么,但是知道例如您正在寻找的问题区域,这将非常方便。


0
sudo apt list package_name
sudo apt search text_to_search_for_in_all_package_fields

-1

作为根:

apt-get search <package name>

如果您对此一无所知,通常最好运行:

command --help

看看如何使用该命令。或看看使用的手册页

man <command>

@Jonno_FTW:实际上,前几天我听到并使用了此命令。但是它给了我太多结果。所以我认为还有其他出色的命令……
Jichao

1
您总是可以通过更少的管道来传递它-apt-cache搜索| 更少
Journeyman Geek

@Jonno_FTW:累了apt-get搜索,shell返回无效的选项。尝试了apt-get的人,找不到搜索option.googled,关于apt-get的信息一无所知。看来我们无法使用apt-get搜索来搜索软件包!
吉超
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.