0

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

Fabby
  • 34,259

1 Answers1

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 
Zanna
  • 70,465
Noisy_Botnet
  • 1,619