Ubuntu – Can’t install software–can I fix missing dpkg


New software can't be installed, because there is a problem with the software currently installed. Do you want to repair now?

hit Repair

Package operation failed 
The installation or removal of a software package failed.
Details => installArchives()failed:Could not exec dpkg!
Error in function

(synaptic:12725): GLib-CRITICAL **: g_child_watch_add_full: assertion 'pid > 0' failed
Could not exec dpkg!
E: Sub-process /usr/bin/dpkg returned an error code (100)
A package failed to install.  Trying to recover:
sh: 1: dpkg: not found

Best Answer

Test this:

Open a terminal - Press Ctrl+Alt+T

Run it:

sudo -i
mkdir /tmp/dpkg
cd /tmp/dpkg
wget http://security.ubuntu.com/ubuntu/pool/main/d/dpkg/dpkg_1.17.5ubuntu5.2_i386.deb
# or
wget http://security.ubuntu.com/ubuntu/pool/main/d/dpkg/dpkg_1.17.5ubuntu5.2_amd64.deb
ar x dpkg*.deb data.tar.gz
tar xvzf data.tar.gz ./usr/bin/dpkg
cp ./usr/bin/dpkg /usr/bin/
apt-get update
apt-get install --reinstall dpkg
Related Question