Kali-Linux
Kali Linux 上的“sudo apt update && sudo apt full-upgrade -y”失敗
我正在嘗試更新和升級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
我已經閱讀了很多文章,但沒有一個提到的解決方案對我有用。任何幫助,將不勝感激
錯誤消息似乎很清楚:
File has unexpected size (40914837 != 40904768). Mirror sync in progress? [IP: 118.38.178.199 80]
您用於下載更新的鏡像正在與其上游源同步。請稍後再試或暫時使用其他鏡像
無論失敗文件的確切問題
Contents
是什麼,處理包或包升級都不需要這些文件。apt-file
為了軟體包(Debian: )的利益,除了需要的文件之外,還下載了它們,apt-file
以便輕鬆搜尋任意軟體包內容,即使軟體包沒有安裝並且它們通常很大。因此,要在 dist 升級完成之前解決此問題,只需刪除
apt-file
:apt-get purge apt-file
您仍然可以稍後重新安裝它,然後查看它是否正常工作。
或者不是刪除包,而是可以暫時禁用它,如下所述:apt - How disable the fetching of the Contents files?