Relationship between APT and dpkg

A Debian package is a compressed archive of a software application.A binary package (a .deb file)
contains files that can be directly used (such as programs or documentation), while a source package contains the source code for the software and the instructions required for building a binary
package.

The dpkg tool was designed to process and install .deb packages, but if it encountered an unsatisfied dependency (like a missing library) that would prevent the package from installing, dpkg
would simply list the missing dependency, because it had no awareness or built-in logic to find or
process the packages that might satisfy those dependencies. The Advanced Package Tool (APT),
170 Kali Linux Revealed
including apt and apt-get, were designed to address these shortcomings and could automatically
resolve these issues.  The magic of APT lies in the fact that it is a complete package management system that
will not only install or remove a package, but will consider the requirements and dependencies of
the packaged application (and even their requirements and dependencies) and attempt to satisfy
them automatically

 

#简单来说dpkg使用的是压缩好的应用软件(.deb)包来安装软件。但是在缺乏一些依赖环境(一些库)的情况下可能会安装失败。

apt则是更高级的包管理工具 安装包的时候会考虑依赖问题 会解决dpkg的问题。

 

Let us digging deeper into the debian package system!

首先 看一下deb包 在/var/cache/apt/archives里

Relationship between APT and dpkg_第1张图片

看一下包的组成

The control.tar.gz archive contains meta-information and the data.tar.xz archive (the compression format might vary) contains the actual files to be installed on the file system.

Relationship between APT and dpkg_第2张图片

 

Relationship between APT and dpkg_第3张图片

 

reference:https://www.jianshu.com/p/6432015c52a6

你可能感兴趣的:(linux运维)