首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >'sudo apt更新& sudo apt完全升级-y‘在卡利Linux上失败

'sudo apt更新& sudo apt完全升级-y‘在卡利Linux上失败
EN

Unix & Linux用户
提问于 2022-03-05 16:53:31
回答 2查看 4.5K关注 0票数 1

我正在尝试用sudo apt update && sudo apt full-upgrade -y更新和升级Kali,但我收到了以下问题。我该如何解决这个问题?任何人都能帮我求你。

代码语言:javascript
运行
复制
┌──(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.

版本的Kali:

代码语言:javascript
运行
复制
No LSB modules are available.
Distributor ID: Kali
Description:    Kali GNU/Linux Rolling
Release:        2022.1
Codename:       kali-rolling

到目前为止我尝试过的:

  • 来自斯库班图的以下命令: sudo /etc/apt/ sudo . wget ~/ sudo "http://pastebin.com/raw.php?i=uzhrtg5M“-O /etc/apt/ sudo .wget sudo apt-获取更新sudo rm /etc/sudo.list.d/ubuntu-exas.list sudo apt-获取更新
  • sudo apt-get upgradesudo apt-get upgrade -f斯库班图 apt-去清洁

我读过很多文章,但没有提到的解决方案对我有用。如能提供任何帮助,将不胜感激。

EN

回答 2

Unix & Linux用户

回答已采纳

发布于 2022-03-05 17:16:27

错误信息似乎非常清楚:

代码语言:javascript
运行
复制
File has unexpected size (40914837 != 40904768). Mirror sync in progress? [IP: 118.38.178.199 80]

用于下载更新的镜像正在从其上游源同步。稍后再试或暂时使用不同的镜像。

票数 4
EN

Unix & Linux用户

发布于 2022-03-05 17:04:29

无论失败文件的确切问题是什么,都不需要这些Contents文件来处理包或包升级。除了为包apt-file (Debian:apt-file)提供所需的文件外,还可以下载这些文件,以便轻松搜索任意包的内容,即使包没有安装,而且通常都很大。

因此,在完成dist升级之前,只需删除apt-file

代码语言:javascript
运行
复制
apt-get purge apt-file

您可以在以后重新安装它,然后查看它是否正确工作。

或者代替删除包,它可以临时禁用,如下面所述:apt -如何禁用内容文件的获取?

票数 4
EN
页面原文内容由Unix & Linux提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://unix.stackexchange.com/questions/693049

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档