0

I am upgrading my RPi 3 from Raspbian stretch to buster. I get this error while running sudo apt dist-upgrade:

Err:1 http://archive.raspberrypi.org/debian buster/main armhf raspberrypi-kernel armhf 1.20210108-1                                                                                                                          
  Hash Sum mismatch
  Hashes of expected file:
   - SHA256:9ecb41e8129827e18f1addee8105491f0227f320f3fccfadaa2507e57229f8b9
   - SHA1:49434d37d9a840805b38e893660f178e6efcd1bc [weak]
   - MD5Sum:514c436e37abab16414852e6f0b1eadd [weak]
   - Filesize:76426824 [weak]
  Hashes of received file:
   - SHA256:ab4000628b59585d0c260db1b09b3bdd2c527eb030ae5d5fb3dc65b26484ffca
   - SHA1:edf95406a68889f193aa87e95745597d0c3e05f0 [weak]
   - MD5Sum:14ed22b18b1477a27c96dd631b05a450 [weak]
   - Filesize:34230959 [weak]
  Last modification reported: Fri, 08 Jan 2021 15:50:34 +0000
Fetched 34.2 MB in 5min 57s (95.7 kB/s)                                                                                                                                                                                      
E: Failed to fetch http://archive.raspberrypi.org/debian/pool/main/r/raspberrypi-firmware/raspberrypi-kernel_1.20210108-1_armhf.deb  Hash Sum mismatch
   Hashes of expected file:
    - SHA256:9ecb41e8129827e18f1addee8105491f0227f320f3fccfadaa2507e57229f8b9
    - SHA1:49434d37d9a840805b38e893660f178e6efcd1bc [weak]
    - MD5Sum:514c436e37abab16414852e6f0b1eadd [weak]
    - Filesize:76426824 [weak]
   Hashes of received file:
    - SHA256:ab4000628b59585d0c260db1b09b3bdd2c527eb030ae5d5fb3dc65b26484ffca
    - SHA1:edf95406a68889f193aa87e95745597d0c3e05f0 [weak]
    - MD5Sum:14ed22b18b1477a27c96dd631b05a450 [weak]
    - Filesize:34230959 [weak]
   Last modification reported: Fri, 08 Jan 2021 15:50:34 +0000
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

I have to mention that I have replaced stretch with buster in apt source-lists. I got this error and then I updated firmware as well usine sudo rpi-update.

I tried sudo apt update and sudo apt install --fix-missing but no change. What should I do?

7
  • 1
    Upgrading from stretch to buster is not recommended. Do a fresh install of Raspberry Pi OS.
    – CoderMike
    Commented Feb 1, 2021 at 18:11
  • I heard that. But I am in a situation that fresh install in very difficult. I need to find a way to upgrade directly. Commented Feb 1, 2021 at 18:27
  • Why is a fresh install difficult?
    – CoderMike
    Commented Feb 1, 2021 at 18:59
  • It is difficult because I don't have physical access to the device. Commented Feb 1, 2021 at 19:14
  • 1
    Sombody reported the question as duplicate of my other question reltaed to golfram-engine. They are totally irrelevant. I am not sure down vote is also by the same person or not but this doesn't sound nice! I am not new to StackExchange. I wont get hurt but for new users, this can make a very bad memory. Please take care Commented Feb 2, 2021 at 3:37

1 Answer 1

0

As Jaromanda-x mentioned in one of the comments, I realized that the file is being downloaded incomplete. I tried to download it in another device directly and I only could get %49 of it.

Today, I tried again and this time it could download it completely with no issue.

Need to get 76.4 MB/2,155 MB of archives.
After this operation, 2,946 MB of additional disk space will be used.
Get:1 http://archive.raspberrypi.org/debian buster/main armhf raspberrypi-kernel armhf 1.20210108-1 [76.4 MB]                                                                                
Fetched 76.4 MB in 1min 39s (766 kB/s)                                                                                                                                                       
Extracting templates from packages: 100%
Preconfiguring packages ...

Whether it was an issue on my side or server side, it remains unknown. But for those who would possibly get the same issue in future, try to see if you can download the file completely. If not, then the issue is most probably not related to anything else than connection between your device and the repository.

Update:
Though I could proceed, but I got some dependency issue for which I had to run apt --fix-broken install. after that, dist-upgrade gave me the same error (hashsum mismatch) this time, I manually downloaded the file and copied into /var/cache/apt/archive/ and then I could continue the process. Now, my Raspberry is using Buster.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.