Debian

我如何知道虛擬軟體包是否“安裝”在 Debian 系統上?

  • March 23, 2018

一些包,有一個Provides:標題。例如,postfixDebian Wheezy 上的軟體包有Provides: mail-transport-agent.

物理上不存在的包mail-transport-agent被視為“虛擬”包。

在基於 Debian 的系統上,我如何知道給定的虛擬軟體包是否已“安裝”(或“提供”)?我可以列出每個“提供”的虛擬包嗎?

提示:要列出每個現有的虛擬包,無論是否安裝,請執行以下操作:aptitude search "~v"

列出提供的軟體包mail-transport-agent

$ aptitude search '~Pmail-transport-agent'
p   citadel-mta                     - complete and feature-rich groupware server
p   courier-mta                     - Courier mail server - ESMTP daemon        
p   dma                             - lightweight mail transport agent          
p   esmtp-run                       - user configurable relay-only MTA - the reg
p   exim4-daemon-heavy              - Exim MTA (v4) daemon with extended feature
p   exim4-daemon-light              - lightweight Exim MTA (v4) daemon          
p   masqmail                        - mail transport agent for intermittently co
p   msmtp-mta                       - light SMTP client with support for server 
p   nullmailer                      - simple relay-only mail transport agent    
i   postfix                         - High-performance mail transport agent     
p   sendmail-bin                    - powerful, efficient, and scalable Mail Tra
p   ssmtp                           - extremely simple MTA to get mail off the s
p   xmail                           - advanced, fast and reliable ESMTP/POP3 mai

使其aptitude search '~Pmail-transport-agent ~i'僅列出已安裝的軟體包(如果有)。

列出目前安裝的包提供的所有虛擬包:

aptitude search '~Rprovides:~i ~v'

有關搜尋模式的說明,請參閱aptitude 手冊。

引用自:https://unix.stackexchange.com/questions/96309