The story of Hash Sum mismatch caused by gcrypto20

Introduction

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.

Solution ①

$ sudo apt-get update --fix-missing

Solution ②

$ sudo apt-get clean or sudo rm-rf /var/lib/apt/lists/*
$ sudo apt-get update

Solution ③

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`

solution

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! !!

reference

Recommended Posts

The story of Hash Sum mismatch caused by gcrypto20
The story of sys.path.append ()
The story of building Zabbix 4.4
[Apache] The story of prefork
The story of Python and the story of NaN
The story of participating in AtCoder
The story of the "hole" in the file
The story of remounting the application server
Story of power approximation by Python
The story of writing a program
The story of an error in PyOCR
The story of verifying the open data of COVID-19
The story of adding MeCab to ubuntu 16.04
The story of making Python an exe
The story of making an immutable mold
The story of manipulating python global variables
Pandas of the beginner, by the beginner, for the beginner [Python]
The story of trying deep3d and losing
The story of deciphering Keras' LSTM model.predict
The story of blackjack A processing (python)
The story of pep8 changing to pycodestyle
The story that performance could be improved just by changing the dtype of numpy
The story of doing deep learning with TPU
Check the operation of OpenCV3 installed by Anaconda
The story of low learning costs for Python
Sort the elements of the array by specifying the conditions
The story of making the Mel Icon Generator version2
Image processing? The story of starting Python for
The story of making a lie news generator
The story of finding the optimal n in N fist
The story of misreading the swap line of the top command
Minimize the number of polishings by combinatorial optimization
Judging the finish of mahjong by combinatorial optimization
The story of reading HSPICE data in Python
The story of trying Sourcetrail × macOS × VS Code
The story of viewing media files in Django
Search by the value of the instance in the list
The story of making a mel icon generator
[Small story] Download the image of Ghibli immediately
The story of moving from Pipenv to Poetry