我正在尝试更新和升级Kali Linux,sudo apt update && sudo apt full-upgrade -y
但收到以下问题。我怎么解决这个问题?任何人都可以帮助我,请。
┌──(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-rolling
到目前为止我已经尝试过:
来自askubuntu的以下命令:
sudo cp /etc/apt/sources.list ~/ sudo wget "http://pastebin.com/raw.php?i=uzhrtg5M" -O /etc/apt/sources.list sudo apt-get update sudo rm /etc/apt/sources.list.d/ubuntu-extras.list sudo apt-get update
sudo apt-get upgrade
sudo apt-get upgrade -f
来自阿斯库本图apt-get clean
我已经阅读了很多文章,但没有一个提到的解决方案对我有用。任何帮助,将不胜感激
无论失败文件的确切问题
Contents
是什么,处理包或包升级都不需要这些文件。apt-file
为了软件包(Debian: )的利益,除了需要的文件之外,还下载了它们,apt-file
以便轻松搜索任意软件包内容,即使软件包没有安装并且它们通常很大。因此,要在 dist 升级完成之前解决此问题,只需删除
apt-file
:您仍然可以稍后重新安装它,然后查看它是否正常工作。
或者不是删除包,而是可以暂时禁用它,如下所述:apt - How disable the fetching of the Contents files?
错误消息似乎很清楚:
您用于下载更新的镜像正在与其上游源同步。请稍后再试或暂时使用其他镜像