0

I'm getting a Hash sum mismatch error while upgrading dpkg.

Following is the complete output:

$ sudo apt upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following packages will be upgraded:
  dpkg
1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 2,084 kB of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://in.archive.ubuntu.com/ubuntu xenial-updates/main amd64 dpkg amd64 1.18.4ubuntu1.3 [2,084 kB]
Err:1 http://in.archive.ubuntu.com/ubuntu xenial-updates/main amd64 dpkg amd64 1.18.4ubuntu1.3
  Hash Sum mismatch
Fetched 2,084 kB in 1s (1,045 kB/s)
E: Failed to fetch http://in.archive.ubuntu.com/ubuntu/pool/main/d/dpkg/dpkg_1.18.4ubuntu1.3_amd64.deb  Hash Sum mismatch

I tried running with --fix-missing but the result was the same:

$ sudo apt-get upgrade --fix-missing
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following packages will be upgraded:
  dpkg
1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 2,084 kB of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://in.archive.ubuntu.com/ubuntu xenial-updates/main amd64 dpkg amd64 1.18.4ubuntu1.3 [2,084 kB]
Err:1 http://in.archive.ubuntu.com/ubuntu xenial-updates/main amd64 dpkg amd64 1.18.4ubuntu1.3
  Hash Sum mismatch
Fetched 2,084 kB in 1s (1,913 kB/s)
E: Failed to fetch http://in.archive.ubuntu.com/ubuntu/pool/main/d/dpkg/dpkg_1.18.4ubuntu1.3_amd64.deb  Hash Sum mismatch

I tried the solutions suggested in the following two answers:

  1. https://askubuntu.com/a/41618/691133
  2. https://askubuntu.com/a/626961/691133

But to no avail.

Any other solution?

2 Answers2

1

Perhaps your ISP cache all http transfering, so you can try a https mirror...

aiwha
  • 52
0

This is related to some sort of bizzare network issue (perhaps router related?), I connected my laptop through another network connection (namely tethering through the smart phone) and apt-get update started working. Wouldn't have believed it if I hadn't seen it with my eyes, etc...

Not to be mystical about it, What I'm saying in short is check your internet connection, maybe try another connection, your update is accessing a lot of package sites, some of them might be filtered for some reason or other, check the URL's for the ones causing problems.

And as a rule of thumb I wouldn't mess with my sources.list unless I knew extremely well what I was doing and that only through the given tools, most often that wouldn't come in the sources.list but in the .d. folder somewhere down the line so it won't override any dependencies and cause problems down at the package tree trunk. And allways keep your apt-get update working or you'll lose the ability to keep your system in sync.