apt

不能用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 发布
  404  Not Found [IP: 185.125.190.36 80]
Err:6 http://gb.archive.ubuntu.com/ubuntu hirsute-updates 发布
  404  Not Found [IP: 185.125.190.36 80]
Err:7 http://gb.archive.ubuntu.com/ubuntu hirsute-backports 发布
  404  Not Found [IP: 185.125.190.36 80]
Err:8 http://gb.archive.ubuntu.com/ubuntu hirsute-security 发布
  404  Not Found [IP: 185.125.190.36 80]
Reading package lists... Done
E: The repository 'http://gb.archive.ubuntu.com/ubuntu hirsute Release' 不再有 Release 文件。
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' 不再有 Release 文件。
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' 不再有 Release 文件。
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' 不再有 Release 文件。
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

我如何解决这个问题?


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