问题

在用apt install curl命令安装的时候,报错

root@zngw:~# apt install curl
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
  libbrotli1 libcurl4t64 libldap-common libldap2 librtmp1 libssh-4
The following NEW packages will be installed:
  curl libbrotli1 libcurl4t64 libldap-common libldap2 librtmp1 libssh-4
0 upgraded, 7 newly installed, 0 to remove and 0 not upgraded.
Need to get 1369 kB of archives.
After this operation, 3635 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://archive.ubuntu.com/ubuntu noble/main amd64 libbrotli1 amd64 1.1.0-2build2 [331 kB]
Get:2 http://archive.ubuntu.com/ubuntu noble/main amd64 libldap2 amd64 2.6.7+dfsg-1~exp1ubuntu8 [195 kB]
Get:3 http://archive.ubuntu.com/ubuntu noble/main amd64 librtmp1 amd64 2.4+20151223.gitfa8646d.1-2build7 [56.3 kB]
Get:4 http://archive.ubuntu.com/ubuntu noble/main amd64 libssh-4 amd64 0.10.6-2build2 [188 kB]
Ign:5 http://archive.ubuntu.com/ubuntu noble-updates/main amd64 libcurl4t64 amd64 8.5.0-2ubuntu10.1
Ign:6 http://archive.ubuntu.com/ubuntu noble-updates/main amd64 curl amd64 8.5.0-2ubuntu10.1
Get:7 http://archive.ubuntu.com/ubuntu noble/main amd64 libldap-common all 2.6.7+dfsg-1~exp1ubuntu8 [31.4 kB]
Err:5 http://archive.ubuntu.com/ubuntu noble-updates/main amd64 libcurl4t64 amd64 8.5.0-2ubuntu10.1
  404  Not Found [IP: 2620:2d:4000:1::101 80]
Err:6 http://archive.ubuntu.com/ubuntu noble-updates/main amd64 curl amd64 8.5.0-2ubuntu10.1
  404  Not Found [IP: 2620:2d:4000:1::101 80]
Fetched 801 kB in 4s (205 kB/s)
E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/c/curl/libcurl4t64_8.5.0-2ubuntu10.1_amd64.deb  404  Not Found [IP: 2620:2d:4000:1::101 80]
E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/c/curl/curl_8.5.0-2ubuntu10.1_amd64.deb  404  Not Found [IP: 2620:2d:4000:1::101 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

解决

发现获取远程源没有问题,应该是远端没有发当前的版本,更新一下应该可以了。

do-release-upgrade
apt-get update

然后再来安装 apt install curl