我正在尝试用sudo apt update && sudo apt full-upgrade -y更新和升级Kali,但我收到了以下问题。我该如何解决这个问题?任何人都能帮我求你。
┌──(kali㉿`enter code here`)-[~]
└─$ sudo apt update && sudo apt full-upgrade -y
Get:1 http://ftp.harukasan.org/kali kali-rolling InRelease [30.6 kB]
Get:2 http://ftp.harukasan.org/kali kali-rolling/non-free Sources [123 kB]
Get:3 http://ftp.harukasan.org/kali kali-rolling/contrib Sources [66.3 kB]
Get:4 http://ftp.harukasan.org/kali kali-rolling/main Sources [14.4 MB]
Get:5 http://ftp.harukasan.org/kali kali-rolling/main amd64 Packages [18.0 MB]
Get:6 http://ftp.harukasan.org/kali kali-rolling/main amd64 Contents (deb) [40.9 MB]
Get:6 http://ftp.harukasan.org/kali kali-rolling/main amd64 Contents (deb) [40.9 MB]
Get:6 http://ftp.harukasan.org/kali kali-rolling/main amd64 Contents (deb) [40.9 MB]
Ign:6 http://ftp.harukasan.org/kali kali-rolling/main amd64 Contents (deb)
Err:6 http://http.kali.org/kali kali-rolling/main amd64 Contents (deb)
File has unexpected size (40914837 != 40904768). Mirror sync in progress? [IP: 118.38.178.199 80]
Get:9 http://ftp.harukasan.org/kali kali-rolling/contrib amd64 Contents (deb) [129 kB]
Ign:9 http://ftp.harukasan.org/kali kali-rolling/contrib amd64 Contents (deb)
Err:6 http://http.kali.org/kali kali-rolling/main amd64 Contents (deb)
File has unexpected size (40914837 != 40904768). Mirror sync in progress? [IP: 118.38.178.199 80]
Get:10 http://ftp.harukasan.org/kali kali-rolling/non-free amd64 Contents (deb) [949 kB]
Ign:10 http://ftp.harukasan.org/kali kali-rolling/non-free amd64 Contents (deb)
Ign:9 http://http.kali.org/kali kali-rolling/contrib amd64 Contents (deb)
Reading package lists... Done
E: Failed to fetch http://http.kali.org/kali/dists/kali-rolling/main/Contents-amd64 File has unexpected size (40914837 != 40904768). Mirror sync in progress? [IP: 118.38.178.199 80]
E: Failed to fetch http://http.kali.org/kali/dists/kali-rolling/contrib/Contents-amd64 File has unexpected size (154305 != 128561). Mirror sync in progress? [IP: 118.38.178.199 80]
E: Some index files failed to download. They have been ignored, or old ones used instead.No LSB modules are available.
Distributor ID: Kali
Description: Kali GNU/Linux Rolling
Release: 2022.1
Codename: kali-rollingsudo apt-get upgrade和sudo apt-get upgrade -f从斯库班图 apt-去清洁我读过很多文章,但没有提到的解决方案对我有用。如能提供任何帮助,将不胜感激。
发布于 2022-03-05 17:16:27
错误信息似乎非常清楚:
File has unexpected size (40914837 != 40904768). Mirror sync in progress? [IP: 118.38.178.199 80]用于下载更新的镜像正在从其上游源同步。稍后再试或暂时使用不同的镜像。
发布于 2022-03-05 17:04:29
无论失败文件的确切问题是什么,都不需要这些Contents文件来处理包或包升级。除了为包apt-file (Debian:apt-file)提供所需的文件外,还可以下载这些文件,以便轻松搜索任意包的内容,即使包没有安装,而且通常都很大。
因此,在完成dist升级之前,只需删除apt-file:
apt-get purge apt-file您可以在以后重新安装它,然后查看它是否正确工作。
或者代替删除包,它可以临时禁用,如下面所述:apt -如何禁用内容文件的获取?
https://unix.stackexchange.com/questions/693049
复制相似问题