0

I have an error on Ubuntu 16.04 when I use

 sudo apt-get upgrade

enter image description here

Zanna
  • 70,465
  • Hi Nagy I believe this is the same issue as here https://askubuntu.com/questions/901482/dpkg-error-code-100 – RiaanV Aug 10 '17 at 09:40

1 Answers1

4

Go to this url http://security.ubuntu.com/ubuntu/pool/main/d/dpkg/ and you will see a list of dpkg packages. You need to find the dpkg version you need than open new terminal. Anywhere your machine I select Desktop.

mkdir dpkg 
cd dpkg

Run:

wget http://security.ubuntu.com/ubuntu/pool/main/d/dpkg/ 

(Add the version of dpkg you need after the last /)

For example I needed dpkg_1.17.5ubuntu5.2_amd64.deb but this does not exist any more so I chose the closest one which is

dpkg_1.17.5ubuntu5.8_amd64.deb 

So:

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

Run

ar x dpkg_1.17.5ubuntu5.8_amd64.deb 

Now you can see the contents:

~/dpkg $ ls
control.tar.gz  data.tar.gz  debian-binary  dpkg_1.17.5ubuntu5.8_amd64.deb

Run

~/dpkg $ tar xfvz data.tar.gz ./usr/bin/dpkg
./usr/bin/dpkg
~/dpkg $ ls
control.tar.gz  data.tar.gz  debian-binary  dpkg_1.17.5ubuntu5.8_amd64.deb  usr
~/dpkg $ cd usr/bin/
~/dpkg/usr/bin $ ls
dpkg

~/dpkg/usr/bin $ sudo cp dpkg /usr/bin/

Then you can run:

sudo apt-get update

I hope that helps.

Zanna
  • 70,465
Dilshad
  • 41