When I apt-get update with Kali 2020.2 on Virtual Box, I got addicted to Hash Sum mismatch
.
I tried the following three methods as a solution, but I got a hash error in the same way and could not solve it, but when I tried it with a certain method, I could solve it, so as a memorandum I will leave it.
The following methods did not work.
$ sudo apt-get update --fix-missing
$ sudo apt-get clean or sudo rm-rf /var/lib/apt/lists/*
$ sudo apt-get update
Edit the config file in /etc/apt/sources.list
to get the repository URL
http://mirrors.ocf.berkeley.edu/kali kali-rolling main non-free contrib
After changing to ʻapt-get update`
So what was the final cause? The hint was that the Hash values match only MD5Sum.
$ sudo apt-get update
Get:1 http://linux3.yz.yamagata-u.ac.jp/pub/linux/kali kali-rolling InRelease [30.5 kB]
Get:2 http://linux3.yz.yamagata-u.ac.jp/pub/linux/kali kali-rolling/main amd64 Packages [16.6 MB]
Err:2 http://linux3.yz.yamagata-u.ac.jp/pub/linux/kali kali-rolling/main amd64 Packages
Hash Sum mismatch
Hashes of expected file:
- Filesize:16590427 [weak]
- SHA256:00ccf318db598c4ddcd7094d28442cdb30088ab7de8cff6c0294de484a102146
- SHA1:12776612134b22e45ffd84538bcc493c87e881a4 [weak]
- MD5Sum:b9db76fb5ce9653b1d721068963a1787 [weak]
Hashes of received file:
- SHA256:4d733b1f1ead1ce850dbd4ff906a1eb959380b181afb6eba0b9898652f58a2a1
- SHA1:b14761cbb2748365e608bbd57db3f1c41be04a53 [weak]
- MD5Sum:b9db76fb5ce9653b1d721068963a1787 [weak]
- Filesize:16590427 [weak]
Last modification reported: Tue, 23 Jun 2020 12:03:38 +0000
Release file created at: Tue, 23 Jun 2020 12:04:33 +0000
Apparently the hash values for SHA256 and SHA1 are different due to the gcrypto20
used in the new Linux.
Based on the site listed for reference, I was able to solve it by the following procedure. (Thank you from the bottom of my heart ...!)
$ sudo bash
# mkdir /etc/gcrypt
# echo all >> /etc/gcrypt/hwf.deny
After making this setting
$ sudo apt-get update
I went! !!
Recommended Posts