使用yum install命令时如何获取软件版本?

时间:2011-10-13 23:21:49

标签: linux rpm yum

有没有办法知道使用yum install命令安装哪个版本的软件?

例如:

$ yum search zsh
Loaded plugins: fastestmirror
=== Matched: zsh ===
zsh.x86_64 : A powerful interactive shell

在这种情况下,如果我输入zsh,如何知道yum install zsh.x86_64的版本?

3 个答案:

答案 0 :(得分:6)

yum list zsh也有效:

[ 16:27 root@host ~ ]# yum list zsh
Loaded plugins: presto, refresh-packagekit
Available Packages
zsh.i686                                                    4.3.10-6.fc13                                                    updates


[ 16:27 root@host ~ ]# yum info zsh
Loaded plugins: presto, refresh-packagekit
Available Packages
Name        : zsh
Arch        : i686
Version     : 4.3.10
Release     : 6.fc13
Size        : 2.1 M
Repo        : updates
Summary     : A powerful interactive shell
URL         : http://zsh.sunsite.dk/
License     : BSD
Description : The zsh shell is a command interpreter usable as an interactive login
            : shell and as a shell script command processor.  Zsh resembles the ksh
            : shell (the Korn shell), but includes many enhancements.  Zsh supports
            : command line editing, built-in spelling correction, programmable
            : command completion, shell functions (with autoloading), a history
            : mechanism, and more.

[ 16:27 root@host ~ ]# yum provides zsh
Loaded plugins: presto, refresh-packagekit
zsh-4.3.10-5.fc13.i686 : A powerful interactive shell
Repo        : fedora
Matched from:



zsh-4.3.10-6.fc13.i686 : A powerful interactive shell
Repo        : updates
Matched from:

man yum

答案 1 :(得分:4)

使用yum信息获取有关特定包的更多信息:

yum info zsh

答案 2 :(得分:-1)

yum -h   # to list yum options
yum info zsh    # lots of info
yum list zsh    # brief info (usually all I need: thanks @chown)