怎么在基于Ubuntu或Debian的Linux 发行版中查看一个软件包的依赖

2023-04-12 09:46:00 依赖 软件包 版中

在Ubuntu或Debian的Linux发行版中,要查看一个软件包的依赖,首先需要使用命令行进入系统。然后使用命令“apt-cache showpkg ”来查看软件包的依赖。

例如,要查看软件包“apache2”的依赖,可以使用命令“apt-cache showpkg apache2”。

输出结果如下:

Package: apache2

Versions:

2.4.29-1ubuntu4 (/var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_bionic_main_binary-amd64_Packages) (/var/lib/dpkg/status)

Description Language:

File: /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_bionic_main_binary-amd64_Packages

MD5: 6ad8c8c0af5f3e5b5d3e33df2057b37b

2.4.18-2ubuntu3.3 (/var/lib/apt/lists/security.ubuntu.com_ubuntu_dists_bionic-security_main_binary-amd64_Packages)

Description Language:

File: /var/lib/apt/lists/security.ubuntu.com_ubuntu_dists_bionic-security_main_binary-amd64_Packages

MD5: 6ad8c8c0af5f3e5b5d3e33df2057b37b

2.4.18-2ubuntu3.3 (/var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_bionic_main_binary-i386_Packages)

Description Language:

File: /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_bionic_main_binary-i386_Packages

MD5: 6ad8c8c0af5f3e5b5d3e33df2057b37b

Reverse Depends:

libapache2-mod-perl2,libapache2-mod-perl2-dbg,libapache2-mod-perl2-dev,libapache2-mod-perl2-doc,libapache2-mod-perl2-ssl

apache2-mpm-itk,apache2-mpm-prefork,apache2-mpm-worker,apache2-suexec-pristine,apache2-suexec-custom

apache2-utils,apache2-doc,apache2-bin,apache2

Dependencies:

2.4.29-1ubuntu4 - libapr1 (2 1.6.3-1) libaprutil1 (2 1.6.1-1) libaprutil1-dbd-sqlite3 (2 1.6.1-1) libaprutil1-ldap (2 1.6.1-1) liblua5.2-0 (2 5.2.4-1ubuntu1) libnghttp2-14 (2 1.32.0-1) libxml2 (2 2.9.4+dfsg1-7.1ubuntu4) mime-support (10 3.60ubuntu1) perl (5 5.26.1-6ubuntu0.3) perl-modules-5.26 (5 5.26.1-6ubuntu0.3) ucf (10 3.0036+nmu3)

2.4.18-2ubuntu3.3 - libapr1 (12 1.5.2-3ubuntu0.1) libaprutil1 (12 1.5.4-2ubuntu1.1) libaprutil1-dbd-sqlite3 (12 1.5.4-2ubuntu1.1) libaprutil1-ldap (12 1.5.4-2ubuntu1.1) liblua5.1-0 (12 5.1.5-8ubuntu1.3) libnghttp2-14 (12 1.20.1-1ubuntu1.1) libxml2 (12 2.9.4+dfsg1-7.1ubuntu4.7) mime-support (8 3.54ubuntu1.1) perl (12 5.22.1-9ubuntu0.8) perl-modules-5.22 (12 5.22.1-9ubuntu0.8) ucf (10 3.0036+nmu3)

从输出结果中可以看到,软件包“apache2”的依赖包有“libapr1”、“libaprutil1”、“libaprutil1-dbd-sqlite3”、“libaprutil1-ldap”、“liblua5.2-0”、“libnghttp2-14”、“libxml2”、“mime-support”、“perl”、“perl-modules-5.26”和“ucf”。

相关文章