How to Fix "Hash Sum Mismatch" Error While Running apt update

Slightly_Doggo

Slightly Nervous Doggo
Server Admin
Fennec
Ruppell
Red
Member
This error primarily occurs on Windows host systems using Virtual Box as a hypervisor. Follow the following troubleshooting steps to resolve the issue.


  1. Start your Kali virtual machine. In the lower right corner of the Virtualbox windows, do you see a green turtle? This means your system is not using VT-X for virtualization, and instead relying on a software virtualization instead of using your hardware. This will cause the virtual machine to be very slow, and may have unexpected issues like this error.

    1599144250000.png

  2. Search for "Windows Features" from the search bar. Find and disable the following features: Hyper-V, Windows Sandbox, Windows Subsystem for Linux. Reboot your computer.

  3. Check for the green turtle in your Kali Linux Virtualbox VM again. If it is still present, open Powershell or CMD as admin and issue the following command...
    bcdedit /set hypervisorlaunchtype off
    This will ensure Boot Manager is not launching Hyper-V at startup. Reboot your computer again.

  4. Check for the green turtle again. If it's now a blue chip, try executing sudo apt update in your Kali VM. If you still have the "hash sum mismatch" error, type the following two commands to temporarily solve your issue.
    Bash:
    sudo mkdir /etc/gcrypt
    echo all >> /etc/gcrypt/hwf.deny
    The previous commands should resolve your issue.



Sources:
https://bugs.launchpad.net/ubuntu/+source/libgcrypt20/+bug/1890006
https://askubuntu.com/questions/1235914/hash-sum-mismatch-error-due-to-identical-sha1-and-md5-but-different-sha256
https://forums.kali.org/showthread.php?48822-Kali-2020-2-OVA-VIRTUALBOX-HASH-SUM-MISMATCH&p=96304#post96304