更新时出错,无法修复 Err:8,发布第一部分后出现此 Err:7

更新时出错,无法修复 Err:8,发布第一部分后出现此 Err:7

结果sudo apt update

Err:8 http://archiver.ubuntu.com/ubuntu focal InRelease                              
  Temporary failure resolving 'archiver.ubuntu.com'
Fetched 433 kB in 20s (21.6 kB/s)     
Reading package lists... Done
W: Failed to fetch http://archiver.ubuntu.com/ubuntu/dists/focal/InRelease  Temporary failure resolving 'archiver.ubuntu.com'
W: Some index files failed to download. They have been ignored, or old ones used instead
--------------------------------------------------------------------------
AND AFTER POSTING TOP DID ANOTHER CHECK AND RUN "sudo apt-get update
------------------------------------------------------------------------
Err:7 http://archiver.ubuntu.com/ubuntu focal InRelease                              
  Temporary failure resolving 'archiver.ubuntu.com'
Hit:8 http://repo.mysql.com/apt/ubuntu focal InRelease                               
Fetched 433 kB in 20s (21.2 kB/s)                 
Reading package lists... Done
W: Failed to fetch http://archiver.ubuntu.com/ubuntu/dists/focal/InRelease  Temporary failure resolving 'archiver.ubuntu.com'
W: Some index files failed to download. They have been ignored, or old ones used instead.

答案1

你的 URL 错误。它archive.ubuntu.com不是archiver.ubuntu.com

编辑/etc/apt/sources.list文件并将“archiver”替换为“archive”。您可以通过终端执行此操作:

sudo sed -i.backup 's/archiver\.ubuntu\.com/archive\.ubuntu\.com/g' /etc/apt/sources.list

它会提示您输入用户密码,您看不到输入的字符,但它确实会接受您的密码输入。一旦执行命令,它就会修复拼写错误,并备份原始文件/etc/apt/sources.list.backup

一旦完成后,运行sudo apt update它应该会按预期工作。

相关内容