Kali-Linux
Kali Linux:apt-get update 返回“Hash Sum mismatch”錯誤
我剛剛在這裡下載了 Kali Linux。
https://images.offensive-security.com/virtual-images/Kali-Linux-2017.1-vbox-i686.ova
root@kali:~# uname -a Linux kali 4.9.0-kali3-686-pae #1 SMP Debian 4.9.18-1kali1 (2017-04-04) i686 GNU/Linux root@kali:~#
但是,當我嘗試更新它時,我收到“雜湊和不匹配”錯誤。
我在這裡發現了類似的問題,但沒有提供解決方案。
當您嘗試使用正在同步的鏡像時,就會發生這種情況。只需要等待它。
root@kali:~# apt-get clean && apt-get update Get:1 http://ftp.yzu.edu.tw/Linux/kali kali-rolling InRelease [30.5 kB] Get:2 http://58.27.38.18/ftp.yzu.edu.tw/Linux/kali kali-rolling/main i386 Packages [15.4 MB] Err:2 http://58.27.38.18/ftp.yzu.edu.tw/Linux/kali kali-rolling/main i386 Packages Hash Sum mismatch Hashes of expected file: - Filesize:15369822 [weak] - SHA256:96c0762f0939a8231227c72b37c38c5aa7e1e8d9df391c541e004785f235668d - SHA1:5b6fb42e4ab12227637bcca0505f0ed7185367af [weak] - MD5Sum:a9100c40be793e8887d3ceef98a39eea [weak] Hashes of received file: - SHA256:2d9eb600d3e43657577de559057912d16b643674437e2211a0785f58a621f38c - SHA1:6398050676d6b9de57807edb20c102210de03c01 [weak] - MD5Sum:8a5e5d7ecd4151676a9b6605627b1f86 [weak] - Filesize:15367961 [weak] Last modification reported: Fri, 28 Jul 2017 00:04:07 +0000 Release file created at: Sat, 29 Jul 2017 12:07:34 +0000 Get:3 http://58.27.38.18/ftp.yzu.edu.tw/Linux/kali kali-rolling/non-free i386 Packages [146 kB] Get:4 http://58.27.38.18/ftp.yzu.edu.tw/Linux/kali kali-rolling/contrib i386 Packages [101 kB] Fetched 15.6 MB in 14s (1,067 kB/s) Reading package lists... Done E: Failed to fetch http://58.27.38.18/ftp.yzu.edu.tw/Linux/kali/dists/kali-rolling/main/binary-i386/Packages.gz Hash Sum mismatch Hashes of expected file: - Filesize:15369822 [weak] - SHA256:96c0762f0939a8231227c72b37c38c5aa7e1e8d9df391c541e004785f235668d - SHA1:5b6fb42e4ab12227637bcca0505f0ed7185367af [weak] - MD5Sum:a9100c40be793e8887d3ceef98a39eea [weak] Hashes of received file: - SHA256:2d9eb600d3e43657577de559057912d16b643674437e2211a0785f58a621f38c - SHA1:6398050676d6b9de57807edb20c102210de03c01 [weak] - MD5Sum:8a5e5d7ecd4151676a9b6605627b1f86 [weak] - Filesize:15367961 [weak] Last modification reported: Fri, 28 Jul 2017 00:04:07 +0000 Release file created at: Sat, 29 Jul 2017 12:07:34 +0000 E: Some index files failed to download. They have been ignored, or old ones used instead. root@kali:~#
這是我的
sources.list
文件root@kali:~# cat /etc/apt/sources.list # # deb cdrom:[Debian GNU/Linux 2017.1 _Kali-rolling_ - Official Snapshot i386 LIVE/INSTALL Binary 20170416-07:26]/ kali-rolling contrib main non-free #deb cdrom:[Debian GNU/Linux 2017.1 _Kali-rolling_ - Official Snapshot i386 LIVE/INSTALL Binary 20170416-07:26]/ kali-rolling contrib main non-free deb http://http.kali.org/kali kali-rolling main non-free contrib # deb-src http://http.kali.org/kali kali-rolling main non-free contrib root@kali:~#
知道如何解決這個問題嗎?
嘗試使用官方鏡像列表中的另一個鏡像 並將其添加到
/etc/apt/sources.list
.像:
deb http://mirrors.ocf.berkeley.edu/kali kali-rolling 主要非免費貢獻
我遇到了問題,然後進入 /etc/apt/sources.list 並將源路徑更新為:deb https://http.kali.org/kali kali-rolling main non-free contrib
一旦我這樣做了,一切都開始毫無問題地更新。