How To Install dpkg on CentOS 7

In this tutorial we learn how to install dpkg on CentOS 7. dpkg is Package maintenance system for Debian Linux

Introduction

In this tutorial we learn how to install dpkg on CentOS 7.

What is dpkg

This package provides the low-level infrastructure for handling the installation and removal of Debian software packages. This package contains the tools (including dpkg-source) required to unpack, build and upload Debian source packages. This package also contains the programs dpkg which used to handle the installation and removal of packages on a Debian system. This package also contains dselect, an interface for managing the installation and removal of packages on the system. dpkg and dselect will certainly be non-functional on a rpm-based system because packages dependencies will likely be unmet.

We can use yum or dnf to install dpkg on CentOS 7. In this tutorial we discuss both methods but you only need to choose one of method to install dpkg.

Install dpkg on CentOS 7 Using yum

Update yum database with yum using the following command.

sudo yum makecache

After updating yum database, We can install dpkg using yum by running the following command:

sudo yum -y install dpkg

Install dpkg on CentOS 7 Using dnf

If you don’t have dnf installed you can install DNF on CentOS 7 first. Update yum database with dnf using the following command.

sudo dnf makecache

After updating yum database, We can install dpkg using dnf by running the following command:

sudo dnf -y install dpkg

How To Uninstall dpkg on CentOS 7

To uninstall only the dpkg package we can use the following command:

sudo dnf remove dpkg

References

Summary

In this tutorial we learn how to install dpkg on CentOS 7 using yum and dnf.