0

This question already has an answer here:

Whenever I am trying to install anything using apt-get, it shows:

Could not exec dpkg
Returned with error code (100)

Same result when I execute

apt-get upgrade

When I type

dpkg --configure -a

It tells me dpkg is not installed and when I run:

apt-get install dpkg

it tells it is the newest version, but when I run:

apt-get install --reinstall dpkg 

it again returns error code (100)

Even system updates are failing to occur, no software is getting downloaded even from the Software Download Center.

I use Ubuntu 14.04 LTS

marked as duplicate by David Foerster, karel, Pilot6, waltinator, Eric Carvalho Jul 20 '17 at 9:38

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

0

Check if dpkg is missing some libraries:

ldd /usr/bin/dpkg

If any library is missing, try to install it. If that's not the issue, then try the following:

sudo -i
mkdir /tmp/dpkg

cd /tmp/dpkg

If you are running a 32 bit version of ubuntu

wget http://security.ubuntu.com/ubuntu/pool/main/d/dpkg/dpkg_1.17.5ubuntu5.2_i386.deb

For 64 bit

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 xfvz data.tar.gz ./usr/bin/dpkg
sudo cp ./usr/bin/dpkg /usr/bin/
sudo apt-get update
sudo apt-get install --reinstall dpkg 

Not the answer you're looking for? Browse other questions tagged or ask your own question.