使用 Yum 搜索、罗列和显示软件包信息

使用 yum search <term> [more_terms] 命令,能够在已启用的软件包仓库中,对所有软件包的名称、描述和概述中进行搜索,最后,yum 会以显示符合合条件的搜索结果列表。

使用 yum search <term> [more_terms] 命令,能够在已启用的软件包仓库中,对所有软件包的名称、描述和概述中进行搜索,最后,yum 会以显示符合合条件的搜索结果列表。

[lugir@hope ~]$ yum search totem
已加载插件:presto, refresh-packagekit, security
================================ Matched: totem ================================
gnome-python2-totem.i686 : 用于和 totem 交流的 python 绑定
oggconvert.noarch : Convert media files to Free formats
totem.i686 : Movie player for GNOME
totem-devel.i686 : Plugin writer's documentation for %{package}
totem-jamendo.i686 : Jamendo plugin for Totem
totem-lirc.i686 : LIRC (Infrared remote) plugin for Totem
totem-mozplugin.i686 : Mozilla plugin for Totem
totem-mythtv.i686 : MythTV plugin for Totem
totem-nautilus.i686 : Video and Audio Properties tab for Nautilus
totem-pl-parser.i686 : Totem Playlist Parser library
totem-pl-parser-devel.i686 : Development files for totem-pl-parser
totem-publish.i686 : Share your playlist with other Totems on the local network
totem-upnp.i686 : UPNP/DLNA plugin for Totem
totem-youtube.i686 : YouTube plugin for Totem

如果你不记得软件包的确切名称,但了解软件包的某些相关名词时,yum search 命令能够有效地帮助你找到想要的软件包。

软件包列表
yum list 以及相关的一些命令则能够为你提供有关软件包、软件包集和软件仓库的信息。

所有的 yum list 命令都能够使用 glob 表达式作为参数,对输出结果进行过滤。在 glob 表达式中,你可以使用 * 代表任何数量个字符,使用 ? 代表任何一个字符。通过后面的示例,你可以对 glob 表达式有些简单的认识。
  • yum list <glob_expr> [more_glob_exprs] ── 列出所有符合 glob 表达式的软件包
  • yum list all ── 列出所有已安装的和可用的软件包
  • yum list installed ── 列出所有已经安装在系统中的软件包。输出结果的最右边一列是取得该软件包的软件仓库。标识为 installed 的软件包则说明它是做为系统基本组件而预安装的。
  • yum list available ── 列出所有启用的软件仓库中可用的软件包
  • yum grouplist ── 列出所有软件包组
  • yum repolist ── 列出所有启用的软件仓库的 ID,名称 及其包含的软件包的数量

查看软件包信息

使用 yum info <package_name> [more_names] 命令可查看一个或多个软件包的信息 (此处同样可以应用 glob 表达式)。

[lugir@hope ~]$ yum info totem
已加载插件:presto, refresh-packagekit, security
已安装的软件包
名称       : totem
架构          : i686
版本          : 2.28.5
次要版本          : 1.fc12
大小          : 7.9 M
仓库          : installed
From repo  : updates
摘要          : Movie player for GNOME
URL        : http://projects.gnome.org/totem/
授权方式        : GPLv2+ with exceptions
描述          : Totem is simple movie player for the GNOME desktop. It features
              : a simple playlist, a full-screen mode, seek and volume controls,
              : as well as a pretty complete keyboard navigation.
              :
              : Totem is extensible through a plugin system.

yum info <package_name>rpm -q --info <package_name> 命令十分相似, 不过 yum 还能够提供软件包的软件仓库来源信息 (即输出结果中的 From repo 行)。

下一节 - 《使用 Yum 安装软件包和软件包集