问题:错误 404 代码状态http://archive.ubuntu.com/ubuntu cosmic InRelease
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.
存储库仍然可以在http://old-releases.ubuntu.com/ubuntu上找到。您可以在 /etc/apt/sources.list 中更改它们,将所有出现的http://archive.ubuntu.com替换为http://old-releases.ubuntu.com。
之后, apt-get upgrade 将再次起作用。
有关处理不再受支持的版本的更多信息,请访问https://help.ubuntu.com/community/EOLUpgrades
最后我强制降级更改source.list ...我关注了这篇文章:https ://linuxconfig.org/how-to-downgrade-ubuntu-linux-system-to-its-previous-version
这是因为您的 Ubuntu 版本已过时。这意味着 Ubuntu 不提供安全支持,因为系统太旧了。您需要禁用源列表中的错误存储库,然后
apt
再次运行。apt-update
不会升级您的系统。它仅更新系统中的存储库。如果您需要升级到另一个 Ubuntu 版本,请运行do-release-upgrade
. 否则,运行apt-upgrade -y
升级系统包。显然,sudo
如果您不是root
用户,请运行。您可以使用 Ubuntu 18.04,因为它与您所拥有的很接近,是一个长期服务版本,并且更新得很好。我定期更新我的 Ubuntu 机器。