aptitude 中包的状态 pi 是什么意思?

aptitude 中包的状态 pi 是什么意思?

可以使用命令 搜索和列出软件包aptitude search foo。这些软件包的状态列在最左边的列中。这些状态的值在 Aptitude 手册中有说明:p未安装、i已安装。

pi我看到一些包裹旁边有状态。这个状态是什么意思?

答案1

来自手册页

Unless you pass the -F option, the output of aptitude search will
look something like this:

   i   apt                             - Advanced front-end for dpkg
   pi  apt-build                       - frontend to apt to build, optimize and in
   cp  apt-file                        - APT package searching utility -- command-
   ihA raptor-utils                    - Raptor RDF Parser utilities

Each search result is listed on a separate line. The first
character of each line indicates the current state of the package:
the most common states are p, meaning that no trace of the package
exists on the system, c, meaning that the package was deleted but
its configuration files remain on the system, i, meaning that the
package is installed, and v, meaning that the package is virtual.
The second character indicates the stored action (if any; otherwise
a blank space is displayed) to be performed on the package, with
the most common actions being i, meaning that the package will be
installed, d, meaning that the package will be deleted, and p,
meaning that the package and its configuration files will be
removed. If the third character is A, the package was automatically
installed.

正如它所说:

  • p作为第一个字符:系统中不存在该包的踪迹
  • i作为第二个字符:该包将被安装

另请参阅:

答案2

man aptitude部分内容如下:

除非您传递 -F 选项,否则 aptitude search 的输出将如下所示:

i   apt                             - Advanced front-end for dpkg
pi  apt-build                       - frontend to apt to build, optimize and in
cp  apt-file                        - APT package searching utility -- command-
ihA raptor-utils                    - Raptor RDF Parser utilities

每个搜索结果列在单独的一行中。每行的第一个字符表示包的当前状态:最常见的状态是 p(表示系统中不存在包的踪迹)、c(表示包已被删除但其配置文件仍保留在系统中)、i(表示包已安装)和 v(表示包是虚拟的)。第二个字符表示要对包执行的存储操作(如果有;否则显示空格),最常见的操作是 i,表示将安装包、d 表示将删除该软件包,p 表示将删除该软件包及其配置文件。如果第三个字符是 A,则表示该软件包已自动安装。

有关可能的状态和操作标志的完整列表,请参阅 aptitude 参考指南中的“访问软件包信息”部分。要自定义搜索的输出,请参阅命令行选项 -F 和 --sort。

相关内容