Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'd like to use the command dpkg in my PHP script (using exec).

I'm running CentOS. Is there a way I can install the command dpkg on there?

Step by step guide would be fantastic.

share|improve this question

with centos you should be using yum, since it is the package manager of centos.

dpkg is for debian (ubuntu) based distributions.

share|improve this answer
so there is now way of installing the dpkg command for use in php? – Moe Jul 2 '10 at 7:23
Use a OS that supports dpkg if you want to use dpkg – Nitrodist Jul 2 '10 at 7:28
the real question is: what do you need dpkg for in php?? – akira Jul 2 '10 at 8:17

For those who wanted to know: you can install dpkg.

Qouted from

  1. Download the latest epel-release rpm from
  2. Install epel-release rpm:

    rpm -Uvh epel-release*rpm

  3. Install dpkg rpm package:

    yum install dpkg

share|improve this answer

These steps worked for me on CentOS 7:

  1. Install epel using the following command: sudo yum -y install epel-release
  2. Refresh repo by typing the following commad: sudo yum repolist
  3. Install the dpkg rpm packages: sudo yum install dpkg-devel dpkg-dev

For more information:

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .