无法使用 apt 安装任何东西:存储库“http://gb.archive.ubuntu.com/ubuntu hirsute Release”不再具有 Release 文件

无法使用 apt 安装任何东西:存储库“http://gb.archive.ubuntu.com/ubuntu hirsute Release”不再具有 Release 文件

我在 Ubuntu 21.04 上尝试安装软件包。直到今天我都没有遇到任何问题,但现在出现了以下错误:

$ sudo apt update && sudo apt upgrade -y
Ign:1 http://gb.archive.ubuntu.com/ubuntu hirsute InRelease
Ign:2 http://gb.archive.ubuntu.com/ubuntu hirsute-updates InRelease
Ign:3 http://gb.archive.ubuntu.com/ubuntu hirsute-backports InRelease
Ign:4 http://gb.archive.ubuntu.com/ubuntu hirsute-security InRelease
Err:5 http://gb.archive.ubuntu.com/ubuntu hirsute Release
  404  Not Found [IP: 185.125.190.36 80]
Err:6 http://gb.archive.ubuntu.com/ubuntu hirsute-updates Release
  404  Not Found [IP: 185.125.190.36 80]
Err:7 http://gb.archive.ubuntu.com/ubuntu hirsute-backports Release
  404  Not Found [IP: 185.125.190.36 80]
Err:8 http://gb.archive.ubuntu.com/ubuntu hirsute-security Release
  404  Not Found [IP: 185.125.190.36 80]
Reading package lists... Done
E: The repository 'http://gb.archive.ubuntu.com/ubuntu hirsute Release' no longer has 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://gb.archive.ubuntu.com/ubuntu hirsute-updates Release' no longer has 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://gb.archive.ubuntu.com/ubuntu hirsute-backports Release' no longer has 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://gb.archive.ubuntu.com/ubuntu hirsute-security Release' no longer has 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 install gcc-10-plugin-dev
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
  libgmp-dev libgmpxx4ldbl libmpc-dev libmpfr-dev
Suggested packages:
  gmp-doc libgmp10-doc libmpfr-doc
The following NEW packages will be installed:
  gcc-10-plugin-dev libgmp-dev libgmpxx4ldbl libmpc-dev libmpfr-dev
0 upgraded, 5 newly installed, 0 to remove and 0 not upgraded.
Need to get 1,927 kB of archives.
After this operation, 12.4 MB of additional disk space will be used.
Do you want to continue? [Y/n]
Err:1 http://gb.archive.ubuntu.com/ubuntu hirsute/main amd64 libgmpxx4ldbl amd64 2:6.2.1+dfsg-1ubuntu2
  404  Not Found [IP: 185.125.190.36 80]
Err:2 http://gb.archive.ubuntu.com/ubuntu hirsute/main amd64 libgmp-dev amd64 2:6.2.1+dfsg-1ubuntu2
  404  Not Found [IP: 185.125.190.36 80]
Err:3 http://gb.archive.ubuntu.com/ubuntu hirsute/main amd64 libmpfr-dev amd64 4.1.0-3build1
  404  Not Found [IP: 185.125.190.36 80]
Err:4 http://gb.archive.ubuntu.com/ubuntu hirsute/main amd64 libmpc-dev amd64 1.2.0-1build1
  404  Not Found [IP: 185.125.190.36 80]
Err:5 http://gb.archive.ubuntu.com/ubuntu hirsute/universe amd64 gcc-10-plugin-dev amd64 10.3.0-1ubuntu1
  404  Not Found [IP: 185.125.190.36 80]
E: Failed to fetch http://gb.archive.ubuntu.com/ubuntu/pool/main/g/gmp/libgmpxx4ldbl_6.2.1%2bdfsg-1ubuntu2_amd64.deb  404  Not Found [IP: 185.125.190.36 80]
E: Failed to fetch http://gb.archive.ubuntu.com/ubuntu/pool/main/g/gmp/libgmp-dev_6.2.1%2bdfsg-1ubuntu2_amd64.deb  404  Not Found [IP: 185.125.190.36 80]
E: Failed to fetch http://gb.archive.ubuntu.com/ubuntu/pool/main/m/mpfr4/libmpfr-dev_4.1.0-3build1_amd64.deb  404  Not Found [IP: 185.125.190.36 80]
E: Failed to fetch http://gb.archive.ubuntu.com/ubuntu/pool/main/m/mpclib3/libmpc-dev_1.2.0-1build1_amd64.deb  404  Not Found [IP: 185.125.190.36 80]
E: Failed to fetch http://gb.archive.ubuntu.com/ubuntu/pool/universe/g/gcc-10/gcc-10-plugin-dev_10.3.0-1ubuntu1_amd64.deb  404  Not Found [IP: 185.125.190.36 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

如果我转到http://gb.archive.ubuntu.com/ubuntu/pool/main/g/gmp,例如查看 libgmp-dev 依赖项,我可以看到有一个名为的文件libgmp10_6.2.1+dfsg-3ubuntu1_amd64.deb,但apt似乎正在寻找libgmp10_6.2.1+dfsg-1ubuntu2_amd64.deb

我该如何解决这个问题?

答案1

您正在尝试升级并安装不再受支持的版本的软件包公告。如果您不想每 6 个月升级一次(这可能需要一段时间),最好的选择是升级到较新的版本,最好是具有长期支持的版本。

相关内容