ubuntu 18.10 cosmic 版本 apt update 出错

ubuntu 18.10 cosmic 版本 apt update 出错

问题:错误 404 代码状态http://archive.ubuntu.com/ubuntu宇宙发布

Ubuntu 18.10 宇宙生命尽头

从昨天开始,apt install 命令不再起作用,我尝试升级我的系统版本,但得到了与 apt-get update 命令相同的错误

$ apt update
Ign:1 http://archive.ubuntu.com/ubuntu cosmic InRelease
Ign:2 http://security.ubuntu.com/ubuntu cosmic-security InRelease
Ign:3 http://archive.ubuntu.com/ubuntu cosmic-updates InRelease
Ign:4 http://archive.ubuntu.com/ubuntu cosmic-backports InRelease
Err:5 http://security.ubuntu.com/ubuntu cosmic-security Release
  404  Not Found [IP: 91.189.88.173 80]
Err:6 http://archive.ubuntu.com/ubuntu cosmic Release
  404  Not Found [IP: 91.189.88.31 80]
Err:7 http://archive.ubuntu.com/ubuntu cosmic-updates Release
  404  Not Found [IP: 91.189.88.31 80]
Err:8 http://archive.ubuntu.com/ubuntu cosmic-backports Release
  404  Not Found [IP: 91.189.88.31 80]
Reading package lists... Done
E: The repository 'http://security.ubuntu.com/ubuntu cosmic-security Release' does not 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://archive.ubuntu.com/ubuntu cosmic Release' does not 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://archive.ubuntu.com/ubuntu cosmic-updates Release' does not 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://archive.ubuntu.com/ubuntu cosmic-backports Release' does not 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.

答案1

存储库仍可在http://old-releases.ubuntu.com/ubuntu。您可以在 /etc/apt/sources.list 中更改它们,将所有出现的http://archive.ubuntu.comhttp://old-releases.ubuntu.com

此后,apt-get upgrade 将再次起作用。

有关处理不再受支持的版本的更多信息,请访问https://help.ubuntu.com/community/EOLUpgrades

答案2

最后我强制降级以更改 source.list ...我遵循了这篇文章:https://linuxconfig.org/how-to-downgrade-ubuntu-linux-system-to-its-previous-version

答案3

  1. 这是因为你的 Ubuntu 版本太旧了。也就是说 Ubuntu 不提供安全支持,因为系统太旧了。你需要禁用源列表中的坏仓库,然后apt重新运行。

  2. apt-update不会升级您的系统。它只会更新系统中的存储库。如果您需要升级到另一个 Ubuntu 版本,请运行do-release-upgrade。否则,请运行apt-upgrade -y以升级系统软件包。显然,sudo如果您不是root用户,请运行。

答案4

你可以使用 Ubuntu 18.04,因为它与你现有的版本很接近,是一个长期服务版本,更新也很好。我会定期更新我的 Ubuntu 机器。

相关内容