EOL后从17.04更新到17.10时apt-get更新失败,找不到镜像

lev*_*her 6 updates apt

在尝试任何类型的 apt-get 推荐时,我收到以下错误列表。例如, sudo apt-get update 最终给了我

Reading package lists... Done
E: The repository 'http://us.archive.ubuntu.com/ubuntu zesty Release' does no longer have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: The repository 'http://us.archive.ubuntu.com/ubuntu zesty-updates Release' does no longer have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: The repository 'http://us.archive.ubuntu.com/ubuntu zesty-backports Release' does no longer have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: The repository 'http://us.archive.ubuntu.com/ubuntu zesty-security Release' does not have a Release file.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
Run Code Online (Sandbox Code Playgroud)

因此,这里有许多解决方案涉及更改为不同的镜像,但这对我来说失败了。我切换到主服务器,没有变化。我让系统为我选择最好的服务器,然后出现一个窗口“找不到合适的下载服务器,请检查您的互联网连接”。好吧,我可以 ping google(并问这个问题!),所以看起来互联网不是问题。

有人有什么想法吗?

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 17.04
Release:    17.04
Codename:   zesty
Run Code Online (Sandbox Code Playgroud)

小智 18

首先,我们将修复您的存储库:

sudo sed -i -re 's/([a-z]{2}\.)?archive.ubuntu.com|security.ubuntu.com/old-releases.ubuntu.com/g' /etc/apt/sources.list
Run Code Online (Sandbox Code Playgroud)

这应该调整您/etc/apt/sources.list的外观与此类似:

deb http://old-releases.ubuntu.com/ubuntu/ zesty-updates main
deb http://old-releases.ubuntu.com/ubuntu/ zesty-backports main
deb http://old-releases.ubuntu.com/ubuntu zesty-security main
deb http://old-releases.ubuntu.com/ubuntu zesty main universe restricted multiverse
Run Code Online (Sandbox Code Playgroud)

然后运行:

sudo apt-get update && sudo apt-get dist-upgrade
Run Code Online (Sandbox Code Playgroud)

  • 考虑添加一段解释这些存储库更改的原因,以及用户确实应该使用受支持的 Ubuntu 版本。 (4认同)
  • 我的意思是,如果我错过了几个星期的更新窗口,更新*失败*?我只是对这种行为感到惊讶,但我想这只是我不了解 Ubuntu LTS 与“出血边缘”的原因。 (3认同)