0

I am using ubuntu 18.04. When I tried to update the software using sudo apt update && sudo apt upgrade, I get a checksum mismatch error:

Get:1 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 linux-headers-4.15.0-144 all 4.15.0-144.148 [11.0 MB]
Err:1 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 linux-headers-4.15.0-144 all 4.15.0-144.148
  Hash Sum mismatch
  Hashes of expected file:
   - SHA512:ab631e944879a603bce23fd40b9a959eb567e0e27b7c2ab34f7eff5c1722b3fed1747123f1682635d825a61a9ef070067330008a4134394d95fe2832cdf80882
   - SHA256:8bca25a9b8d9ef5c43b94dbd8e4aec36f77d7617cf524e1d8e89e4429927d383
   - SHA1:c15a145876ad7e6059fc24b86d8b7273a160c415 [weak]
   - MD5Sum:8f50bc4934fc62ba526f1d75244e0727 [weak]
   - Filesize:10956636 [weak]
  Hashes of received file:
   - SHA512:155fe310a3c19ba653d69e8bf797739ac27d9fc1a5cf140682dec7652c35c0af08b703e9c474f63500e9a7b44f6e3de4086caf7301cbae9cc8fe238fabfe3caa
   - SHA256:70985c1b1f8fb1013e6912a3e3ac7580ddb878f42f962c9328dbd99e8b633e68
   - SHA1:e05ac0266a1b6349489456caa234ae61cf69e315 [weak]
   - MD5Sum:98de1c987d3726787cd89cc6a45450ba [weak]
   - Filesize:10956636 [weak]
  Last modification reported: Thu, 13 May 2021 09:11:42 +0000
Fetched 11.0 MB in 5s (2,418 kB/s)                   
E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/l/linux/linux-headers-4.15.0-144_4.15.0-144.148_all.deb  Hash Sum mismatch
   Hashes of expected file:
    - SHA512:ab631e944879a603bce23fd40b9a959eb567e0e27b7c2ab34f7eff5c1722b3fed1747123f1682635d825a61a9ef070067330008a4134394d95fe2832cdf80882
    - SHA256:8bca25a9b8d9ef5c43b94dbd8e4aec36f77d7617cf524e1d8e89e4429927d383
    - SHA1:c15a145876ad7e6059fc24b86d8b7273a160c415 [weak]
    - MD5Sum:8f50bc4934fc62ba526f1d75244e0727 [weak]
    - Filesize:10956636 [weak]
   Hashes of received file:
    - SHA512:155fe310a3c19ba653d69e8bf797739ac27d9fc1a5cf140682dec7652c35c0af08b703e9c474f63500e9a7b44f6e3de4086caf7301cbae9cc8fe238fabfe3caa
    - SHA256:70985c1b1f8fb1013e6912a3e3ac7580ddb878f42f962c9328dbd99e8b633e68
    - SHA1:e05ac0266a1b6349489456caa234ae61cf69e315 [weak]
    - MD5Sum:98de1c987d3726787cd89cc6a45450ba [weak]
    - Filesize:10956636 [weak]
   Last modification reported: Thu, 13 May 2021 09:11:42 +0000
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

I am curious to know what could be the root cause of this. Is there a suggestion on how to fix this?

Update: I tried the suggestions related to clearing caches, changing mirros, etc mentioned in Trouble downloading packages list due to a "Hash sum mismatch" error, but they did not help.

Just to confirm the checksum of the file, I tried wget http://archive.ubuntu.com/ubuntu/pool/main/l/linux/linux-headers-4.15.0-144_4.15.0-144.148_all.deb && md5sum linux-headers-4.15.0-144_4.15.0-144.148_all.deb and it prints 98de1c987d3726787cd89cc6a45450ba, which is a different checksum as compared to 8f50bc4934fc62ba526f1d75244e0727 mentioned in the upgrade error message and https://www.ubuntuupdates.org/package/core/bionic/main/security/linux-headers-4.15.0-144. Why would the checksum change? Can the package files on the repositories be replaced after releasing?

  • 1
    What are the outputs of sudo apt update and sudo apt-get --fix-missing? Please use edit to include these outputs – Nmath Jun 12 '21 at 04:47
  • Tried sudo apt-get update and sudo apt-get upgrade --fix-missing, but getting the same error even after that when I try sudo apt-get upgrade – Ajmal Ahammed Jun 12 '21 at 05:00
  • @Nmath asked you to include the output from sudo apt update in your question as those output messages provide clues... As we cannot see that output, we can't see whatever you see. Subsequent commands like sudo apt-get --fix-missing or sudo apt-get upgrade aren't helpful if the clues are in the first command sudo apt update (ie. are all expected lines there, no warnings, errors or missing lines of output ... why you were asked to add it to your question). – guiverc Jun 12 '21 at 05:11
  • 1
  • Thanks for the link. I tried some of the suggestions mentioned, but none of them helped yet. Tried the remaining ones. – Ajmal Ahammed Jun 12 '21 at 05:51
  • The downloaded file from the ubuntu archive indeed has a different checksum. wget http://archive.ubuntu.com/ubuntu/pool/main/l/linux/linux-headers-4.15.0-144_4.15.0-144.148_all.deb && md5sum linux-headers-4.15.0-144_4.15.0-144.148_all.deb prints 98de1c987d3726787cd89cc6a45450ba whereas the upgrade error message and https://www.ubuntuupdates.org/package/core/bionic/main/security/linux-headers-4.15.0-144 shows an expected md5 checksum 8f50bc4934fc62ba526f1d75244e0727 – Ajmal Ahammed Jun 12 '21 at 06:30
  • check this links I hope these links work for you : https://askubuntu.com/questions/41605/trouble-downloading-packages-list-due-to-a-hash-sum-mismatch-error?noredirect=1&lq=1 https://stackoverflow.com/questions/64120030/hash-sum-mismatch-when-apt-get-update-ubuntu-20-04-vm-with-multipass – apm Jun 12 '21 at 06:52

1 Answers1

0

The package downloaded from the official repo seems to be corrupted. I tried installing it manually by dpkg -i linux-headers-4.15.0-144_4.15.0-144.148_all.deb which gave an error that the package could not be decompressed.

I changed the download source to the mirror of University of Arizona and the upgrade worked after that. Some of the other mirrors could have worked too.