zypper:如何列出软件包的不同可用版本?


13

我想获取软件包的所有可用版本的列表,与在Yast中看到的列表相同,但使用zypper。

OpenSuse 13.1,zypper 1.9.16

Answers:


14

使用search -s。例如,sudo zypper search -s fortune可以给出以下输出:

Loading repository data...
Reading installed packages...

S | Name    | Type       | Version      | Arch   | Repository                    
--+---------+------------+--------------+--------+-------------------------------
i | fortune | package    | 1.99.1-6.1.4 | x86_64 | 13.1-OpenSUSE-InstallOss      
i | fortune | package    | 1.99.1-6.1.4 | x86_64 | Tumbleweed-OpenSUSE-InstallOss
v | fortune | package    | 1.99.1-4.1.2 | x86_64 | 12.3-OpenSUSE-Oss             
v | fortune | package    | 1.99.1-6.1.4 | i586   | 13.1-OpenSUSE-InstallOss      
v | fortune | package    | 1.99.1-6.1.4 | i586   | Tumbleweed-OpenSUSE-InstallOss
v | fortune | package    | 1.99.1-4.1.2 | i586   | 12.3-OpenSUSE-Oss             
  | fortune | srcpackage | 1.99.1-6.1.4 | noarch | 13.1-OpenSUSE-SourceOss       
  | fortune | srcpackage | 1.99.1-6.1.4 | noarch | Tumbleweed-OpenSUSE-SourceOss 
  | fortune | srcpackage | 1.99.1-4.1.2 | noarch | 12.3-OpenSUSE-SourceOss       

2
由于我只需要查找它:第一列标题中的S代表“状态”。值是: i- >已安装。 v- >已安装另一个版本。空白->均不
可用
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.