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?

6
  • Have you tried using a different mirror?
    – Videonauth
    Dec 3, 2017 at 11:31
  • @Videonauth Yeah. Tried downloading from the main server. Same error. Dec 3, 2017 at 11:48
  • Try sudo apt-get clean and start over.
    – N0rbert
    Dec 3, 2017 at 12:50
  • @N0rbert - Had already tried that. The second linked answer had suggested what you are saying. Dec 4, 2017 at 15:25
  • Did you try any of the answers in the linked question? Are you located behind a proxy server? What's the output of sudo apt-get update? Dec 22, 2017 at 3:59

2 Answers 2

1

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

1
  • 3
    Please add details about how to try an HTTPS mirror. Dec 9, 2017 at 15:05
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.

Not the answer you're looking for? Browse other questions tagged .