dpkg-scanpackages: command not found

dpkg-scanpackages utility creates a Packages file from a tree of binary packages. The Packages file is used by dselect to provide a list of packages available for installation. Basically, it is a tool that allows you to convert a directory containing .deb packages into a repository.

If you encounter the below error:

dpkg-scanpackages: command not found

you may try installing below package as per your choice of distribution.

Distribution Command
Debian apt-get install dpkg-dev
Ubuntu apt-get install dpkg-dev
Alpine apk add dpkg-dev
Kali Linux apt-get install dpkg-dev
Fedora dnf install dpkg-dev
Raspbian apt-get install dpkg-dev
Docker docker run cmd.cat/dpkg-scanpackages dpkg-scanpackages

Summary

In some cases you may want to add your own repository. This is useful if you have a couple of .deb files and want to make them accessible for installation to user computers. Doing so is a simple 3-step procedure. Start by creating the directory and putting the .deb files in that directory. Next, you’ll run the dpkg-scanpackages command to create the repository metadata. As the last step, add the newly created repository to the sources.list files on all computers that need to use it.

Related Post