Ubuntu – Lost/Deleted dpkg (package manager for Debian). How to get it back


OS: Ubuntu 12.04

Accidentally deleted dpkg. Now, packages can't be installed. So, needs an dpkg installer which installs packages.

Best Answer

Download the dpkg package for your release from https://launchpad.net/ubuntu/+source/dpkg/.

Extract the file.

cd to the root of the dpkg source directory.

sudo make install

You may need to download some packages if ./configure fails