Debian’s package management system uses the dpkg command to install, remove, and query packages. dpkg-deb is a backend command for building and managing Debian package archives. You’ll often want to use dpkg to pass commands through to dpkg-deb, rather than call dpkg-deb directly.
If you encounter below error:
dpkg-deb: command not found
You may try installing below package as per your choice of distribution.
Distribution | Command |
---|---|
OS X | brew install dpkg |
Debian | apt-get install dpkg |
Ubuntu | apt-get install dpkg |
Alpine | apk add dpkg |
Kali Linux | apt-get install dpkg |
Fedora | dnf install dpkg |
Raspbian | apt-get install dpkg |
Docker | docker run cmd.cat/dpkg-deb dpkg-deb |
Summary
The apt-get program is a tool that is designed to downloadpackages and their dependencies so that you can avoid doing that tedious task yourself.However, when it comes to actually installing the packages, apt-get relies on the low-leveldpkg command, which is what does the actual job of installation and tracking whatis installed. So, if you have a .deb package and need to install it, apt-get will not be able to help you. Instead, you need to use dpkg directly, by invoking it like this:
# dpkg –i yourfile.deb
That will extract the package and install it on your system. If you just want to extract thecontents of the package without installing them to your system, you can use the –unpack parameter, like this:
# dpkg --unpack yourfile.deb