当我输入 sudo apt-get update 时,我得到了这个输出
Hit:1 http://br.archive.ubuntu.com/ubuntu focal InRelease
Hit:2 https://repo.steampowered.com/steam stable InRelease
Get:3 http://br.archive.ubuntu.com/ubuntu focal-updates InRelease [111 kB]
Hit:4 http://dl.google.com/linux/chrome/deb stable InRelease
Get:5 http://br.archive.ubuntu.com/ubuntu focal-backports InRelease [98,3 kB]
Hit:6 http://security.ubuntu.com/ubuntu focal-security InRelease
Hit:7 http://ppa.launchpad.net/teejee2008/ppa/ubuntu focal InRelease
Get:8 http://br.archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages [318 kB]
Get:9 http://br.archive.ubuntu.com/ubuntu focal-updates/main i386 Packages [190 kB]
Get:10 http://br.archive.ubuntu.com/ubuntu focal-updates/main Translation-en [119 kB]
Get:11 http://br.archive.ubuntu.com/ubuntu focal-updates/main amd64 DEP-11 Metadata [196 kB]
Get:11 http://br.archive.ubuntu.com/ubuntu focal-updates/main amd64 DEP-11 Metadata [196 kB]
Get:11 http://br.archive.ubuntu.com/ubuntu focal-updates/main amd64 DEP-11 Metadata [196 kB]
Get:11 http://br.archive.ubuntu.com/ubuntu focal-updates/main amd64 DEP-11 Metadata [196 kB]
Get:11 http://br.archive.ubuntu.com/ubuntu focal-updates/main amd64 DEP-11 Metadata [196 kB]
Get:11 http://br.archive.ubuntu.com/ubuntu focal-updates/main amd64 DEP-11 Metadata [196 kB]
Get:11 http://br.archive.ubuntu.com/ubuntu focal-updates/main amd64 DEP-11 Metadata [196 kB]
Get:11 http://br.archive.ubuntu.com/ubuntu focal-updates/main amd64 DEP-11 Metadata [196 kB]
Get:11 http://br.archive.ubuntu.com/ubuntu focal-updates/main amd64 DEP-11 Metadata [196 kB]
Get:11 http://br.archive.ubuntu.com/ubuntu focal-updates/main amd64 DEP-11 Metadata [196 kB]
Get:11 http://br.archive.ubuntu.com/ubuntu focal-updates/main amd64 DEP-11 Metadata [196 kB]
Get:11 http://br.archive.ubuntu.com/ubuntu focal-updates/main amd64 DEP-11 Metadata [196 kB]
Get:11 http://br.archive.ubuntu.com/ubuntu focal-updates/main amd64 DEP-11 Metadata [196 kB]
Get:11 http://br.archive.ubuntu.com/ubuntu focal-updates/main amd64 DEP-11 Metadata [196 kB]
Get:11 http://br.archive.ubuntu.com/ubuntu focal-updates/main amd64 DEP-11 Metadata [196 kB]
Get:11 http://br.archive.ubuntu.com/ubuntu focal-updates/main amd64 DEP-11 Metadata [196 kB]
Get:11 http://br.archive.ubuntu.com/ubuntu focal-updates/main amd64 DEP-11 Metadata [196 kB]
Get:11 http://br.archive.ubuntu.com/ubuntu focal-updates/main amd64 DEP-11 Metadata [196 kB]
Get:11 http://br.archive.ubuntu.com/ubuntu focal-updates/main amd64 DEP-11 Metadata [196 kB]
Get:11 http://br.archive.ubuntu.com/ubuntu focal-updates/main amd64 DEP-11 Metadata [196 kB]
Get:11 http://br.archive.ubuntu.com/ubuntu focal-updates/main amd64 DEP-11 Metadata [196 kB]
Get:11 http://br.archive.ubuntu.com/ubuntu focal-updates/main amd64 DEP-11 Metadata [196 kB]
Ign:11 http://br.archive.ubuntu.com/ubuntu focal-updates/main amd64 DEP-11 Metadata
Ign:34 http://br.archive.ubuntu.com/ubuntu focal-updates/universe amd64 DEP-11 Metadata
Ign:35 http://br.archive.ubuntu.com/ubuntu focal-updates/multiverse amd64 DEP-11 Metadata
Get:11 http://br.archive.ubuntu.com/ubuntu focal-updates/main amd64 DEP-11 Metadata [196 kB]
Err:11 http://br.archive.ubuntu.com/ubuntu focal-updates/main amd64 DEP-11 Metadata
File has unexpected size (195784 != 195720). Mirror sync in progress? [IP: 200.236.31.4 80]
Hashes of expected file:
- Filesize:195720 [weak]
- SHA256:620989b440f546d66d39a063c6e8c049e6f716f0da9f510ebf1da727be3f5844
- SHA1:96786274267a2bfce9c0b3c6bbc7b8e4076d08d8 [weak]
- MD5Sum:6b22100a971f517dd23973ba9a242c8c [weak]
Release file created at: Fri, 07 Aug 2020 18:58:05 +0000
Get:34 http://br.archive.ubuntu.com/ubuntu focal-updates/universe amd64 DEP-11 Metadata [177 kB]
Err:34 http://br.archive.ubuntu.com/ubuntu focal-updates/universe amd64 DEP-11 Metadata
Get:35 http://br.archive.ubuntu.com/ubuntu focal-updates/multiverse amd64 DEP-11 Metadata [2.468 B]
Err:35 http://br.archive.ubuntu.com/ubuntu focal-updates/multiverse amd64 DEP-11 Metadata
Get:36 http://br.archive.ubuntu.com/ubuntu focal-backports/main amd64 c-n-f Metadata [112 B]
Get:37 http://br.archive.ubuntu.com/ubuntu focal-backports/restricted amd64 c-n-f Metadata [116 B]
Get:38 http://br.archive.ubuntu.com/ubuntu focal-backports/universe amd64 Packages [3.096 B]
Get:39 http://br.archive.ubuntu.com/ubuntu focal-backports/universe i386 Packages [2.268 B]
Get:40 http://br.archive.ubuntu.com/ubuntu focal-backports/universe Translation-en [1.448 B]
Get:41 http://br.archive.ubuntu.com/ubuntu focal-backports/universe amd64 DEP-11 Metadata [1.972 B]
Get:41 http://br.archive.ubuntu.com/ubuntu focal-backports/universe amd64 DEP-11 Metadata [1.972 B]
Get:41 http://br.archive.ubuntu.com/ubuntu focal-backports/universe amd64 DEP-11 Metadata [1.972 B]
Get:41 http://br.archive.ubuntu.com/ubuntu focal-backports/universe amd64 DEP-11 Metadata [1.972 B]
Get:41 http://br.archive.ubuntu.com/ubuntu focal-backports/universe amd64 DEP-11 Metadata [1.972 B]
Ign:41 http://br.archive.ubuntu.com/ubuntu focal-backports/universe amd64 DEP-11 Metadata
Get:41 http://br.archive.ubuntu.com/ubuntu focal-backports/universe amd64 DEP-11 Metadata [1.972 B]
Err:41 http://br.archive.ubuntu.com/ubuntu focal-backports/universe amd64 DEP-11 Metadata
File has unexpected size (1976 != 1972). Mirror sync in progress? [IP: 200.236.31.4 80]
Hashes of expected file:
- Filesize:1972 [weak]
- SHA256:3d9adb8ec018eafe9e452377669976073b7e893d89a0664392c1435c2d256b7e
- SHA1:347c09e2129d07363b358e6459655fa191ce9de8 [weak]
- MD5Sum:a16154af0d5dc497f1d7d365cbd29897 [weak]
Release file created at: Fri, 07 Aug 2020 18:58:28 +0000
Fetched 212 kB in 2s (124 kB/s)
Reading package lists... Done
E: Failed to fetch http://br.archive.ubuntu.com/ubuntu/dists/focal-updates/main/dep11/Components-amd64.yml.xz File has unexpected size (195784 != 195720). Mirror sync in progress? [IP: 200.236.31.4 80]
Hashes of expected file:
- Filesize:195720 [weak]
- SHA256:620989b440f546d66d39a063c6e8c049e6f716f0da9f510ebf1da727be3f5844
- SHA1:96786274267a2bfce9c0b3c6bbc7b8e4076d08d8 [weak]
- MD5Sum:6b22100a971f517dd23973ba9a242c8c [weak]
Release file created at: Fri, 07 Aug 2020 18:58:05 +0000
E: Failed to fetch http://br.archive.ubuntu.com/ubuntu/dists/focal-updates/universe/dep11/Components-amd64.yml.xz
E: Failed to fetch http://br.archive.ubuntu.com/ubuntu/dists/focal-updates/multiverse/dep11/Components-amd64.yml.xz
E: Failed to fetch http://br.archive.ubuntu.com/ubuntu/dists/focal-backports/universe/dep11/Components-amd64.yml.xz File has unexpected size (1976 != 1972). Mirror sync in progress? [IP: 200.236.31.4 80]
Hashes of expected file:
- Filesize:1972 [weak]
- SHA256:3d9adb8ec018eafe9e452377669976073b7e893d89a0664392c1435c2d256b7e
- SHA1:347c09e2129d07363b358e6459655fa191ce9de8 [weak]
- MD5Sum:a16154af0d5dc497f1d7d365cbd29897 [weak]
Release file created at: Fri, 07 Aug 2020 18:58:28 +0000
E: Some index files failed to download. They have been ignored, or old ones used instead.
我已尝试过,sudo rm -rf /var/lib/apt/lists/*
但问题仍然存在。
答案1
就我而言,我必须将 Ubuntu 软件更新服务器从巴西更改为美国,然后运行:
$ apt-get clean
$ apt-get update
这确实有效。
答案2
发生这种情况的原因是并非所有镜像都会同时更新。出于各种原因,更新会按计划推出,并且可能需要几天时间才能使所有镜像同步。
如果你遇到这个问题,最好的解决办法就是小睡一会儿或等到第二天。如果你想确认,或者看看你的镜像何时更新,你实际上可以看这里。这将向您显示镜像的状态,包括它们在同步过程中可能落后多少。
您还可以将镜像更改为新的,如果您要更新以修复的是一个重大安全问题,这可能是一个好主意。
如果您决定更改镜像,请从“首选项”中打开“软件和更新”,第一个选项卡上有一个下拉菜单,标有“下载自:”,然后选择备选镜像。如果您感兴趣,通常认为最佳做法是选择地质上离您最近的镜像。
答案3
apt-get clean 成功了!感谢大家的帮助。
答案4
apt-get clean
对我来说没用。在这里找到了解决方案:
https://askubuntu.com/a/1229971
“打开软件和更新并更改下载自到主服务器“