0

I've recently installed Kali Linux on a virtual machine and decided to run apt update. How ever every time I try I get this scary looking error.

Get:1 https://kali.download/kali kali-rolling InRelease [30.5 kB]
Get:2 https://kali.download/kali kali-rolling/main amd64 Packages [16.5 MB]
Err:2 https://kali.download/kali kali-rolling/main amd64 Packages
  Hash Sum mismatch
  Hashes of expected file:
   - Filesize:16520977 [weak]
   - SHA256:f01529c6d3e3259775f052b84a336ad9aa0a02156751b1edb28cb7cc635a46d6
   - SHA1:8cb85fa99d2cf0bccacb68c65dba8b043070e4cf [weak]
   - MD5Sum:92b1c6a2e788e13acc678a3173a4c653 [weak]
  Hashes of received file:
   - SHA256:f07b7c964b1e75b1e60fb1c5bb9b24eddcc39055ef81cf0578311a4ce9b2d786
   - SHA1:77c969f7b2e45cfb9c1b36ccd3971f28ca202312 [weak]
   - MD5Sum:d7f99187e8a2eb6c482a005ef7c12230 [weak]
   - Filesize:16520977 [weak]
  Last modification reported: Fri, 14 Aug 2020 12:02:10 +0000
  Release file created at: Fri, 14 Aug 2020 12:03:05 +0000
Get:3 https://kali.download/kali kali-rolling/non-free amd64 Packages [197 kB]
Get:4 https://kali.download/kali kali-rolling/contrib amd64 Packages [102 kB]
Fetched 16.6 MB in 2s (8,704 kB/s)
Reading package lists... Done
E: Failed to fetch https://kali.download/kali/dists/kali-rolling/main/binary-amd64/Packages.gz  Hash Sum mismatch
   Hashes of expected file:
    - Filesize:16520977 [weak]
    - SHA256:f01529c6d3e3259775f052b84a336ad9aa0a02156751b1edb28cb7cc635a46d6
    - SHA1:8cb85fa99d2cf0bccacb68c65dba8b043070e4cf [weak]
    - MD5Sum:92b1c6a2e788e13acc678a3173a4c653 [weak]
   Hashes of received file:
    - SHA256:f07b7c964b1e75b1e60fb1c5bb9b24eddcc39055ef81cf0578311a4ce9b2d786
    - SHA1:77c969f7b2e45cfb9c1b36ccd3971f28ca202312 [weak]
    - MD5Sum:d7f99187e8a2eb6c482a005ef7c12230 [weak]
    - Filesize:16520977 [weak]
   Last modification reported: Fri, 14 Aug 2020 12:02:10 +0000
   Release file created at: Fri, 14 Aug 2020 12:03:05 +0000
E: Some index files failed to download. They have been ignored, or old ones used instead.

After doing a bit of googling I found two other people who had the same issue as me.

Kali Linux: apt-get update returns "Hash Sum mismatch" error

https://forums.kali.org/showthread.php?32585-update-error-Hash-Sum-mismatch

Both of which had the same solution that looked promising.

Unfortunately, even after editing /etc/apt/sources.list to use other mirrors from http://mirror.anquan.cl/kali I still get the same error.

Edit (clarification): The solutions I've found online, the links above, all say to change the mirror used in /etc/apt/sources.list which doesn't work for me.

4 Answers4

1

Try using another mirror from the official mirror list and add it to /etc/apt/sources.list.

Like:

deb http://mirrors.ocf.berkeley.edu/kali kali-rolling main non-free contrib
SINA GH
  • 11
  • 1
    I should have stated that I've tried this solution already instead of thinking others had the time to read the links I posted, so I clarified this in my post. I already tried this, and with other mirrors. It doesn't work for me. – AlienNova Aug 16 '20 at 06:37
1

After a couple of hours more googling I found this post which can explain the problem a lot better than I could.

Kali Linux: apt update returns "Hash Sum mismatch" error

The fix was to:

1: Shutdown the Kali VM

2: Open cmd as an administrator

3: Run bcdedit /set hypervisorlaunchtype off

4: Simply reboot

0

For those who cannot disable hyper-v, because they must run Docker at the same time, then I had luck with 'Kali Linux 32-bit (PAE) VirtualBox'. No checksum errors there.

0

I had the same issue and this resolved it for me:

mkdir /etc/gcrypt
echo all >> /etc/gcrypt/hwf.deny
apt update

source

Chris Davies
  • 116,213
  • 16
  • 160
  • 287
unil
  • 1