当我尝试更新 Ubuntu Server 22.04 中的 apt 存储库时出现以下错误
channaveer@channaveer:~$ sudo apt update
Ign:1 http://old-releases.ubuntu.com/ubuntu jammy InRelease
Ign:2 http://security.ubuntu.com/ubuntu impish-security InRelease
Ign:3 http://old-releases.ubuntu.com/ubuntu jammy-updates InRelease
Err:4 http://security.ubuntu.com/ubuntu impish-security Release
404 Not Found [IP: 91.189.91.38 80]
Ign:5 http://old-releases.ubuntu.com/ubuntu jammy-backports InRelease
Ign:6 http://old-releases.ubuntu.com/ubuntu jammy-security InRelease
Err:7 http://old-releases.ubuntu.com/ubuntu jammy Release
404 Not Found [IP: 91.189.91.124 80]
Err:8 http://old-releases.ubuntu.com/ubuntu jammy-updates Release
404 Not Found [IP: 91.189.91.124 80]
Err:9 http://old-releases.ubuntu.com/ubuntu jammy-backports Release
404 Not Found [IP: 91.189.91.124 80]
Err:10 http://old-releases.ubuntu.com/ubuntu jammy-security Release
404 Not Found [IP: 91.189.91.124 80]
Reading package lists... Done
E: The repository 'http://security.ubuntu.com/ubuntu impish-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://old-releases.ubuntu.com/ubuntu jammy 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://old-releases.ubuntu.com/ubuntu jammy-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://old-releases.ubuntu.com/ubuntu jammy-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.
E: The repository 'http://old-releases.ubuntu.com/ubuntu jammy-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.
我怎样才能消除所有这些错误sudo apt update
以下是我的**/etc/apt/sources.list**
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://old-releases.ubuntu.com/ubuntu jammy main restricted
# deb-src http://old-releases.ubuntu.com/ubuntu jammy main restricted
## Major bug fix updates produced after the final release of the
## distribution.
deb http://old-releases.ubuntu.com/ubuntu jammy-updates main restricted
# deb-src http://old-releases.ubuntu.com/ubuntu jammy-updates main restricted
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://old-releases.ubuntu.com/ubuntu jammy universe
# deb-src http://old-releases.ubuntu.com/ubuntu jammy universe
deb http://old-releases.ubuntu.com/ubuntu jammy-updates universe
# deb-src http://old-releases.ubuntu.com/ubuntu jammy-updates universe
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://old-releases.ubuntu.com/ubuntu jammy multiverse
# deb-src http://old-releases.ubuntu.com/ubuntu jammy multiverse
deb http://old-releases.ubuntu.com/ubuntu jammy-updates multiverse
# deb-src http://old-releases.ubuntu.com/ubuntu jammy-updates multiverse
## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://old-releases.ubuntu.com/ubuntu jammy-backports main restricted universe multiverse
# deb-src http://old-releases.ubuntu.com/ubuntu jammy-backports main restricted universe multiverse
deb http://old-releases.ubuntu.com/ubuntu jammy-security main restricted
# deb-src http://old-releases.ubuntu.com/ubuntu jammy-security main restricted
deb http://old-releases.ubuntu.com/ubuntu jammy-security universe
# deb-src http://old-releases.ubuntu.com/ubuntu jammy-security universe
deb http://old-releases.ubuntu.com/ubuntu jammy-security multiverse
# deb-src http://old-releases.ubuntu.com/ubuntu jammy-security multiverse
答案1
打开一个终端。
编辑文件 /etc/apt/sources.list 并删除 impish 和 old-release 的无效条目。
sudo nano /etc/apt/sources.list
保存文件并重试 apt upgrade。