apt-get install encountered 404 Not Found

System:

docker images: nvidia/cuda:11.1-cudnn8-runtime-ubuntu20.04

Question

An error was reported when apt install -y ceph-common

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

Reading package lists...
Building dependency tree...
Reading state information...
The following additional packages will be installed:
  ibverbs-providers libaio1 libbabeltrace1 libboost-context1.71.0
  libboost-iostreams1.71.0 libboost-program-options1.71.0
  libboost-thread1.71.0 libcephfs2 libdw1 libelf1 libgoogle-perftools4
  libibverbs1 libleveldb1d libnl-3-200 libnl-route-3-200 liboath0 librabbitmq4
  librados2 libradosstriper1 librbd1 librdmacm1 libsnappy1v5
  libtcmalloc-minimal4 libunwind8 libyaml-0-2 python3-ceph-argparse
  python3-ceph-common python3-cephfs python3-prettytable python3-rados
  python3-rbd python3-yaml
Suggested packages:
  ceph ceph-mds
The following NEW packages will be installed:
  ceph-common ibverbs-providers libaio1 libbabeltrace1 libboost-context1.71.0
  libboost-iostreams1.71.0 libboost-program-options1.71.0
  libboost-thread1.71.0 libcephfs2 libdw1 libelf1 libgoogle-perftools4
  libibverbs1 libleveldb1d libnl-3-200 libnl-route-3-200 liboath0 librabbitmq4
  librados2 libradosstriper1 librbd1 librdmacm1 libsnappy1v5
  libtcmalloc-minimal4 libunwind8 libyaml-0-2 python3-ceph-argparse
  python3-ceph-common python3-cephfs python3-prettytable python3-rados
  python3-rbd python3-yaml
0 upgraded, 33 newly installed, 0 to remove and 42 not upgraded.
Need to get 27.8 MB of archives.
After this operation, 113 MB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu focal/main amd64 libelf1 amd64 0.176-1.1build1 [44.0 kB]
Get:2 http://archive.ubuntu.com/ubuntu focal/main amd64 libyaml-0-2 amd64 0.2.2-1 [48.9 kB]
Get:3 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 python3-yaml amd64 5.3.1-1ubuntu0.1 [136 kB]
Get:4 http://archive.ubuntu.com/ubuntu focal/main amd64 libboost-iostreams1.71.0 amd64 1.71.0-6ubuntu6 [237 kB]
Get:5 http://archive.ubuntu.com/ubuntu focal/main amd64 libboost-thread1.71.0 amd64 1.71.0-6ubuntu6 [249 kB]
Get:6 http://archive.ubuntu.com/ubuntu focal/main amd64 libnl-3-200 amd64 3.4.0-1 [53.9 kB]
Get:7 http://archive.ubuntu.com/ubuntu focal/main amd64 libnl-route-3-200 amd64 3.4.0-1 [149 kB]
Get:8 http://archive.ubuntu.com/ubuntu focal/main amd64 libibverbs1 amd64 28.0-1ubuntu1 [53.6 kB]
Get:9 http://archive.ubuntu.com/ubuntu focal/main amd64 librdmacm1 amd64 28.0-1ubuntu1 [64.9 kB]
Err: 10 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 librados2 amd64 15.2.14-0ubuntu0.20.04.1
  404 Not Found [IP: 91.189.88.142 80]
Err:11 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 librbd1 amd64 15.2.14-0ubuntu0.20.04.1
  404 Not Found [IP: 91.189.88.142 80]
Err: 12 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 python3-ceph-argparse amd64 15.2.14-0ubuntu0.20.04.1
  404 Not Found [IP: 91.189.88.142 80]
Err: 13 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 python3-ceph-common all 15.2.14-0ubuntu0.20.04.1
  404 Not Found [IP: 91.189.88.142 80]
Err:14 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 libcephfs2 amd64 15.2.14-0ubuntu0.20.04.1
  404 Not Found [IP: 91.189.88.142 80]
Err:15 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 python3-rados amd64 15.2.14-0ubuntu0.20.04.1
  404 Not Found [IP: 91.189.88.142 80]
Err:16 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 python3-cephfs amd64 15.2.14-0ubuntu0.20.04.1
  404 Not Found [IP: 91.189.88.142 80]
Get:17 http://archive.ubuntu.com/ubuntu focal/main amd64 python3-prettytable all 0.7.2-5 [20.1 kB]
Err:18 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 python3-rbd amd64 15.2.14-0ubuntu0.20.04.1
  404 Not Found [IP: 91.189.88.142 80]
Get:19 http://archive.ubuntu.com/ubuntu focal/main amd64 libaio1 amd64 0.3.112-5 [7184 B]
Get:20 http://archive.ubuntu.com/ubuntu focal/main amd64 libdw1 amd64 0.176-1.1build1 [226 kB]
Get:21 http://archive.ubuntu.com/ubuntu focal/main amd64 libbabeltrace1 amd64 1.5.8-1build1 [156 kB]
Get:22 http://archive.ubuntu.com/ubuntu focal/main amd64 libboost-context1.71.0 amd64 1.71.0-6ubuntu6 [207 kB]
Get:23 http://archive.ubuntu.com/ubuntu focal/main amd64 libboost-program-options1.71.0 amd64 1.71.0-6ubuntu6 [342 kB]
Get:24 http://archive.ubuntu.com/ubuntu focal/main amd64 libtcmalloc-minimal4 amd64 2.7-1ubuntu2 [93.0 kB]
Get:25 http://archive.ubuntu.com/ubuntu focal/main amd64 libunwind8 amd64 1.2.1-9build1 [47.6 kB]
Get:26 http://archive.ubuntu.com/ubuntu focal/main amd64 libgoogle-perftools4 amd64 2.7-1ubuntu2 [195 kB]
Get:27 http://archive.ubuntu.com/ubuntu focal/main amd64 libsnappy1v5 amd64 1.1.8-1build1 [16.7 kB]
Get:28 http://archive.ubuntu.com/ubuntu focal/main amd64 libleveldb1d amd64 1.22-3ubuntu2 [139 kB]
Get:29 http://archive.ubuntu.com/ubuntu focal/main amd64 liboath0 amd64 2.6.1-1.3 [44.7 kB]
Get:30 http://archive.ubuntu.com/ubuntu focal/main amd64 librabbitmq4 amd64 0.10.0-1 [35.8 kB]
Err:31 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 libradosstriper1 amd64 15.2.14-0ubuntu0.20.04.1
  404 Not Found [IP: 91.189.88.142 80]
Err: 32 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 ceph-common amd64 15.2.14-0ubuntu0.20.04.1
  404 Not Found [IP: 91.189.88.142 80]
Get:33 http://archive.ubuntu.com/ubuntu focal/main amd64 ibverbs-providers amd64 28.0-1ubuntu1 [232 kB]
Fetched 2798 kB in 4s (748 kB/s)
E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/c/ceph/librados2_15.2.14-0ubuntu0.20.04.1_amd64.deb 404 Not Found [IP: 91.189.88.142 80]
E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/c/ceph/librbd1_15.2.14-0ubuntu0.20.04.1_amd64.deb 404 Not Found [IP: 91.189.88.142 80]
E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/c/ceph/python3-ceph-argparse_15.2.14-0ubuntu0.20.04.1_amd64.deb 404 Not Found [IP: 91.189.88.142 8
0]
E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/c/ceph/python3-ceph-common_15.2.14-0ubuntu0.20.04.1_all.deb 404 Not Found [IP: 91.189.88.142 80 ]
E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/c/ceph/libcephfs2_15.2.14-0ubuntu0.20.04.1_amd64.deb 404 Not Found [IP: 91.189.88.142 80]
E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/c/ceph/python3-rados_15.2.14-0ubuntu0.20.04.1_amd64.deb 404 Not Found [IP: 91.189.88.142 80]
E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/c/ceph/python3-cephfs_15.2.14-0ubuntu0.20.04.1_amd64.deb 404 Not Found [IP: 91.189.88.142 80]
E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/c/ceph/python3-rbd_15.2.14-0ubuntu0.20.04.1_amd64.deb 404 Not Found [IP: 91.189.88.142 80]
E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/c/ceph/libradosstriper1_15.2.14-0ubuntu0.20.04.1_amd64.deb 404 Not Found [IP: 91.189.88.142 80]
E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/c/ceph/ceph-common_15.2.14-0ubuntu0.20.04.1_amd64.deb 404 Not Found [IP: 91.189.88.142 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
The command '/bin/sh -c apt install -y ceph-common' returned a non-zero code: 100

I have already apt-get update once before, and I still encounter this problem. So I updated again, and then I didn’t encounter any problems. This problem was also caused by installing other packages several times later, and it was solved in the same way.

Summarize:
apt-get update twice, and then install the package you want to install