在安裝之前如何知道將要安裝的軟體包的版本?

在安裝之前如何知道將要安裝的軟體包的版本?

我可以新增一個ppa來更改儲存庫中套件的版本 - 例如 Inkscape 有一個開發版本。

在使用 來安裝“Inkscape”之前sudo apt-get install inkscape,我如何知道要安裝哪個版本?

答案1

使用apt-cache policy

$ apt-cache policy gitlab-ce
gitlab-ce:
  Installed: 8.6.1-ce.0
  Candidate: 8.7.0-ce.0
  Version table:
     8.7.0-ce.0 0
        500 https://packages.gitlab.com/gitlab/gitlab-ce/ubuntu/ trusty/main amd64 Packages
     8.6.7-ce.0 0
        500 https://packages.gitlab.com/gitlab/gitlab-ce/ubuntu/ trusty/main amd64 Packages
     8.6.6-ce.0 0
        500 https://packages.gitlab.com/gitlab/gitlab-ce/ubuntu/ trusty/main amd64 Packages
     8.6.5-ce.0 0
        500 https://packages.gitlab.com/gitlab/gitlab-ce/ubuntu/ trusty/main amd64 Packages
     8.6.4-ce.0 0
        500 https://packages.gitlab.com/gitlab/gitlab-ce/ubuntu/ trusty/main amd64 Packages
     8.6.3-ce.0 0
        500 https://packages.gitlab.com/gitlab/gitlab-ce/ubuntu/ trusty/main amd64 Packages
     8.6.2-ce.0 0
        500 https://packages.gitlab.com/gitlab/gitlab-ce/ubuntu/ trusty/main amd64 Packages
 *** 8.6.1-ce.0 0
        500 https://packages.gitlab.com/gitlab/gitlab-ce/ubuntu/ trusty/main amd64 Packages
        100 /var/lib/dpkg/status
     8.6.0-ce.0 0
        500 https://packages.gitlab.com/gitlab/gitlab-ce/ubuntu/ trusty/main amd64 Packages
     8.5.11-ce.1 0
        500 https://packages.gitlab.com/gitlab/gitlab-ce/ubuntu/ trusty/main amd64 Packages
     8.5.10-ce.0 0
        500 https://packages.gitlab.com/gitlab/gitlab-ce/ubuntu/ trusty/main amd64 Packages

將選擇列出的版本Candidate。當前版本(如果有)將列出Installed並標有星號。

相關內容