DEV Community

Cover image for Resolve “Hash sum mismatch” error when running `sudo apt-get update` in Kali linux 2024.1
Abdussalam Mujeeb-ur-rahman
Abdussalam Mujeeb-ur-rahman

Posted on

Resolve “Hash sum mismatch” error when running `sudo apt-get update` in Kali linux 2024.1

Encountering a Hash sum mismatch error during the execution of sudo apt-get update in Kali Linux can be attributed to various factors. These factors encompass network issues, repository problems, syncing errors, outdated repositories, package management system anomalies, package corruptions, software upgrades, disk issues, package verification discrepancies, and security measures such as proxy or firewall settings.

hash sum mismatch

So, I encountered this error and I tried so many possible solutions. These included ensuring a stable internet connection, clearing the apt cache, temporarily disabling the firewall, and exploring other network-related adjustments.

I stumbled upon a solution, which helped solve the problem.
This was how I solved the issue:

Firstly, I paid a visit to Kali's official mirror site. I scrolled down and I saw something like in the image below.

kali mirror list

I needed to view the closest mirror. And I scrolled down and saw this.

close mirrors

The closest to me seemed to be http://kali.download/kali/. So, I then decided to change my mirror link to it.

Now, the next question is, how did I view and change my mirror link?.
Firstly, run sudo su in your terminal to switch to the super user mode.
Then, run nano /etc/apt/sources.list to access the mirror link. You will see something like this

sources.list file

Change only the link in the second line to the nearest mirror link you got. As you can see, I already changed it.
Then run sudo apt-get update again.
I hope this helps.
Thanks.

Top comments (0)