• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
KaliTut

KaliTut

Kali Linux tutorial and Linux system tips

  • Home
  • Raspberry Pi
  • Privacy Policy
  • About us

how to fix hash sum mismatch

Last Updated on May 16, 2020 by Kalitut 11 Comments

Kali Linux Hash Sum mismatch

Kali Linux Hash Sum mismatch
Kali Linux Hash Sum mismatch

A few days ago I got some time to set up Kali Linux on VMware everything seems fine until I tried to update it using apt-get update I get this annoying error

apt-get update
Get:1 http://kali.mirror.garr.it/mirrors/kali kali-rolling InRelease [30.5 kB]
Get:2 http://kali.mirror.garr.it/mirrors/kali kali-rolling/contrib Sources [66.1 kB]
Get:3 http://kali.mirror.garr.it/mirrors/kali kali-rolling/non-free Sources [124 kB
Get:4 http://kali.mirror.garr.it/mirrors/kali kali-rolling/main Sources [11.0 MB]
Get:4 http://kali.mirror.garr.it/mirrors/kali kali-rolling/main Sources [11.0 MB]
Err:4 http://kali.mirror.garr.it/mirrors/kali kali-rolling/main Sources

  Hash Sum mismatch

  Hashes of expected file:
   - Filesize:11015732 [weak]
   - SHA256:b20b6264d4bd5200e6e3cf319df56bd7fea9b2ff5c9dbd44f3e7e530a6e6b9e0
   - SHA1:2d8b15ab8109d678fe1810800e0be8ce3be87201 [weak]
   - MD5Sum:d0b5f94ba474b31f00f8911ac78258ec [weak]

  Hashes of received file:
   - SHA256:a7b9ca82fc1a400b2e81b2ebc938542abfdbfa5aecdfa8744f60571746ec967b
   - SHA1:5d870530aa87398dcb11ecb07e6a25ca0746985f [weak]
   - MD5Sum:9a4824220c0a5fa6cb74390851116b73 [weak]
   - Filesize:9828918 [weak]

  Last modification reported: Wed, 23 Dec 2015 00:03:15 +0000

  Release file created at: Thu, 01 Jun 2017 12:15:05 +0000

Get:5 http://kali.mirror.garr.it/mirrors/kali kali-rolling/main i386 Packages [15.0 MB]
Get:6 http://kali.mirror.garr.it/mirrors/kali kali-rolling/contrib i386 Packages [98.7 kB]
Get:7 http://kali.mirror.garr.it/mirrors/kali kali-rolling/non-free i386 Packages [145 kB]
Fetched 25.3 MB in 11min 20s (37.2 kB/s)                              

Reading package lists... Done

E: Failed to fetch http://kali.mirror.garr.it/mirrors/kali/dists/kali-rolling/main/source/Sources.gz  Hash Sum mismatch

   Hashes of expected file:
    - Filesize:11015732 [weak]
    - SHA256:b20b6264d4bd5200e6e3cf319df56bd7fea9b2ff5c9dbd44f3e7e530a6e6b9e
    - SHA1:2d8b15ab8109d678fe1810800e0be8ce3be87201 [weak]
    - MD5Sum:d0b5f94ba474b31f00f8911ac78258ec [weak]

   Hashes of received file:
    - SHA256:a7b9ca82fc1a400b2e81b2ebc938542abfdbfa5aecdfa8744f60571746ec967b
    - SHA1:5d870530aa87398dcb11ecb07e6a25ca0746985f [weak]
    - MD5Sum:9a4824220c0a5fa6cb74390851116b73 [weak]
    - Filesize:9828918 [weak]
   Last modification reported: Wed, 23 Dec 2015 00:03:15 +0000

   Release file created at: Thu, 01 Jun 2017 12:15:05 +0000

E: Some index files failed to download. They have been ignored, or old ones used instead.

the problem clearly must be in the sources.list file of Kali Linux … I have tried to fix it in many ways but I always end up where I started Hash Sum mismatch is showing up over and over, things seem too complicated for me but the fix was simple really simple ! and here it is,
update your Repositories in sources.list file to :

deb http://http.kali.org/kali kali-rolling main non-free contrib

Save and close the file
Clean, update, upgrade and dist-upgrade your Kali installation

apt-get clean && apt-get update && apt-get upgrade -y && apt-get dist-upgrade -y

apt-get hash sum mismatch

It is estimated that many people have encountered this problem.

The main idea is: some of the network providers you use will set up some transparent caches to increase the internal speed of the network and reduce the traffic of exports. Some files you obtain are not real files on the source server, but are obtained from the cache When some of the verification information obtained in the cache is inconsistent with the source, it naturally prompts that the verification has failed and cannot be updated.

This problem is actually related to the format design of the apt software repository. The newly released version of the software warehouse is updated more frequently. The files in the cache should be updated synchronously. Unfortunately, because of the speed of multiple mirror sites, the cache cannot guarantee consistency.
When the network provider is strong enough to not set up a transparent cache, this problem does not exist. This is why some people report that the use of wireless network cards (mobile, Unicom’s 3g network) is all OK, and it is not enough to switch back to Great Wall Broadband or Broadband.

The above is the real cause of the problem.

My home network is broadband communication, there is no doubt that this network ISP will definitely set up transparent cache.
The solution is simple, just bypass the cache and go directly to the site.
How to bypass this cache set by ISP is the same as bypassing the Great Wall firewall.
I found a free ssh service proxy,
and then installed a proxychains, set up your proxy in /etc/proxychians.conf to
use proxychains sudo apt-get update to

update normally (no matter which source you update, domestic or foreign)

if You don’t think the proxy is fast enough, just update the source index and sudo apt-ge install xxx directly when installing the software. There is no problem installing various software in the software center.

The fundamental solution to this problem is related to the format design of the apt repository.
However, ISPs in Europe and the United States seem to have good networks and fewer caches. There are not many people who raise this issue. Therefore, it is unpredictable whether they will improve the design.

There is another situation that will naturally be resolved, that is, after the source index is gradually stabilized, your ISP’s cache will be consistent with the real data, and the update will naturally be fine.
It must be updated frequently when new versions are released. It is estimated that most of the new version control cannot wait.

The above is about the real cause of Hash Sum mismatch problem when updating the source index, and the solution, I hope it will be helpful to all friends

Filed Under: Kali Linux Tagged With: hash sum mismatch

Comments

  1. Unknown says

    September 24, 2017 at 9:03 pm

    can you help me it dont work for me

    Reply
  2. Walid Salame says

    September 24, 2017 at 9:05 pm

    uninstall the package that are casing the error …
    if you don;t know it just copy and past the error code in here and i will tell you what to do

    Reply
  3. Unknown says

    October 13, 2017 at 7:40 pm

    Thanks a lot man . Was able to solve my virtualbox dkms issue 🙂

    Reply
  4. Walid Salame says

    October 13, 2017 at 7:41 pm

    my pleasure 🙂

    Reply
  5. Naweed says

    November 25, 2017 at 11:01 am

    deb https://http.kali.org/kali kali-rolling main contrib non-free

    add this it will work
    🙂

    Reply
  6. Unknown says

    December 21, 2017 at 6:53 pm

    can you help me it dont work for me
    please help

    Reply
  7. Unknown says

    February 24, 2018 at 12:06 pm

    getsystem and getprivs is not working for me.
    its showing ""Rex::TimeoutError Operation timed out"" error.
    i tried to get system access of win 7 from my kali 2017.1.
    i have tried many solution nothing get worked for me!

    Reply
  8. shaun says

    July 27, 2020 at 5:48 pm

    its doesnt work !.
    it still show hashmismatch any help would be cool!

    Reply
    • Walid Salame says

      July 27, 2020 at 10:22 pm

      what you are trying to do ? and please post the error you are receiving

      Reply
  9. Emport says

    May 9, 2022 at 7:33 pm

    When running “apt-get clean && apt-get update && apt-get upgrade -y && apt-get dist-upgrade -y” I get the following error:

    “Get:1513 http://mirrors.dotsrc.org/kali kali-rolling/main amd64 zsh-common all 5.8.1-1 [3,986 kB]
    Get:1514 http://mirrors.dotsrc.org/kali kali-rolling/main amd64 zsh-autosuggestions all 0.7.0-1 [16.7 kB]
    Get:1515 http://mirrors.dotsrc.org/kali kali-rolling/main amd64 powershell amd64 7.1.3-1.debian.10 [68.3 MB]
    Get:1516 http://mirrors.dotsrc.org/kali kali-rolling/main amd64 unicornscan amd64 0.4.7-1kali3 [498 kB]
    Fetched 2,348 MB in 3min 7s (12.6 MB/s)
    E: Failed to fetch http://mirrors.dotsrc.org/kali/pool/main/f/fonts-quicksand/fonts-quicksand_0.2016-2.1_all.deb Error reading from server – read (104: Connection reset by peer) [IP: 130.225.254.116 80]
    E: Failed to fetch http://deb.i2p2.no/pool/main/i/i2p/libjbigi-jni_1.5.0-2ubuntu1_amd64.deb Hash Sum mismatch
    Hashes of expected file:
    – SHA256:931db82656de38129db9d7844f807a897d180ce46af95ae70c3fb2296686ae73
    – SHA1:6e066c2a6f1e4fe7d7e1b3a0ea98ef5edf74f329 [weak]
    – MD5Sum:57d286111381eed29b46b275ced6df5f [weak]
    – Filesize:268672 [weak]
    Hashes of received file:
    – SHA256:a5153d855f1e931f3867fede5c76b86761db936c28e6bee18bd23d91575b78a3
    – SHA1:1d9b16dd8a83929e5e1b6ae0dbbb573ee0c14de4 [weak]
    – MD5Sum:5a354a99bce4f6ee380955bf5c98b14a [weak]
    – Filesize:77019 [weak]
    Last modification reported: Sun, 08 May 2022 13:46:04 +0000
    E: Failed to fetch http://deb.i2p2.no/pool/main/i/i2p/i2p_1.5.0-2ubuntu1_all.deb Hash Sum mismatch
    Hashes of expected file:
    – SHA256:fec0be590d36b7f891ef19c65ca4ce4e310582e9ec7acaddbe172a5afd375cb6
    – SHA1:110ce9ca24d8bba953d13f1b3a10bc9b2bef396f [weak]
    – MD5Sum:6add5bc167d78ee0f649e327a0677560 [weak]
    – Filesize:68520 [weak]
    Hashes of received file:
    – SHA256:a5153d855f1e931f3867fede5c76b86761db936c28e6bee18bd23d91575b78a3
    – SHA1:1d9b16dd8a83929e5e1b6ae0dbbb573ee0c14de4 [weak]
    – MD5Sum:5a354a99bce4f6ee380955bf5c98b14a [weak]
    – Filesize:77019 [weak]
    Last modification reported: Sun, 08 May 2022 13:46:04 +0000
    E: Failed to fetch http://deb.i2p2.no/pool/main/i/i2p/i2p-router_1.5.0-2ubuntu1_all.deb Hash Sum mismatch
    Hashes of expected file:
    – SHA256:257cabba6ecad02f46e25eb235e9f6a016b38c336ed3f3dee39a841dbba34213
    – SHA1:0f384a95c6fc6875f1f1d3cd8dcfa9a335a6206d [weak]
    – MD5Sum:99264d2d63cb28ea7974dd94e63f6cac [weak]
    – Filesize:11047400 [weak]
    Hashes of received file:
    – SHA256:a5153d855f1e931f3867fede5c76b86761db936c28e6bee18bd23d91575b78a3
    – SHA1:1d9b16dd8a83929e5e1b6ae0dbbb573ee0c14de4 [weak]
    – MD5Sum:5a354a99bce4f6ee380955bf5c98b14a [weak]
    – Filesize:77019 [weak]
    Last modification reported: Sun, 08 May 2022 13:46:04 +0000
    E: Unable to fetch some archives, maybe run apt-get update or try with –fix-missing?”

    This is my sources.list:

    “# See https://www.kali.org/docs/general-use/kali-linux-sources-list-repositories/
    #deb http://http.kali.org/kali kali-rolling main contrib non-free

    # Additional line for source packages
    deb http://http.kali.org/kali kali-rolling main contrib non-free

    #deb https://assets.checkra.in/debian /
    #deb https://assets.checkra.in/debian /”

    You can contact me on here but there’s probably a bigger chance of me answering on Discord (depending on when someone answers).

    Discord: Emport#6532

    Reply
  10. Edward Storks says

    December 17, 2022 at 2:47 pm

    This is how it worked for me.

    Remove all the lines starting from deb and paste the below lines in sources list.
    sudo nano /etc/apt/sources.list
    Update the below lines:
    deb https://http.kali.org/kali kali-rolling main contrib non-free
    deb-src http://http.kali.org/kali kali-rolling main contrib non-free
    Save & Exit out of the Nano.
    Run the below command and you should be good to go.
    sudo apt-get clean && apt-get update && apt-get upgrade -y && apt-get dist-upgrade -y && apt autoremove -y

    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Follow us

  • Facebook
  • Twitter
  • YouTube

Categories

  • Android pentesting tools
  • Arduino
  • Books
  • Darknet
  • database
  • General
  • Github Tools
  • Hacking
  • Kali Linux
  • Linux
  • Linux Commands
  • Network Administrator
  • Penetration Testing
  • Penetration Testing Tools
  • PowerShell
  • Raspberry Pi
  • resources
  • Review
  • Termux
  • Tutorials
  • Ubuntu
  • Uncategorized
  • Video Tutorials
  • vmware
  • WiFi Adapter
  • WiFi Pentesting
  • Wireless Router
  • Wireshark

Recent Posts

  • Hijacked Wi-Fi? Thorough explanation of hacking techniques
  • Windows PowerShell tutorial for beginners
  • Learn to Hack Steps from Beginner to Hacker
  • PowerShell Tutorial – GUIDE introduction with basics
  • Top Hacking Tools
  • Home
  • About us
  • Privacy Policy
  • Affiliate disclaimer

Copyright © 2023