尽管 podman 文档表明我应该能够将其安装到 ubuntu 20.04 中,但我不能:
sudo apt-get install podman
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
libevent-dev libevent-extra-2.1-7 libevent-openssl-2.1-7 libhwloc-dev libhwloc-plugins libhwloc15 libpmix2
libpsm-infinipath1 libpsm2-2 libwireshark13 libwiretap10 libwsutil11 libxnvctrl0 libyajl2
linux-headers-5.4.0-125 linux-headers-5.4.0-125-generic linux-image-5.4.0-125-generic
linux-modules-5.4.0-125-generic linux-modules-extra-5.4.0-125-generic ocl-icd-libopencl1
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
catatonit conmon containernetworking-plugins dns-root-data dnsmasq-base fuse-overlayfs fuse3 libfuse3-3
podman-machine-cni podman-plugins slirp4netns
The following packages will be REMOVED:
fuse
The following NEW packages will be installed:
catatonit conmon containernetworking-plugins dns-root-data dnsmasq-base fuse-overlayfs fuse3 libfuse3-3 podman
podman-machine-cni podman-plugins slirp4netns
0 upgraded, 12 newly installed, 1 to remove and 15 not upgraded.
Need to get 2937 kB/30.1 MB of archives.
After this operation, 148 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 https://provo-mirror.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_20.04 podman-plugins 100:1.2.0-1 [1116 kB]
Err:1 https://provo-mirror.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_20.04 podman-plugins 100:1.2.0-1
File has unexpected size (1034528 != 1116320). Mirror sync in progress? [IP: 91.193.113.70 443]
Hashes of expected file:
- SHA256:49e09a6ff2b0b827ddc0d830edd160b4ec03875a3f8c8195bfd53b7867fd0b22
- SHA1:44470e9d5c4b64f1602d3a82f1b28e400e16796c [weak]
- MD5Sum:d5cc530c789e0fc256ecc02603ff9685 [weak]
- Filesize:1116320 [weak]
Get:2 https://provo-mirror.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_20.04 podman-machine-cni 100:0.0.0-1 [1821 kB]
Err:2 https://provo-mirror.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_20.04 podman-machine-cni 100:0.0.0-1
File has unexpected size (1639592 != 1820908). Mirror sync in progress? [IP: 91.193.113.70 443]
Hashes of expected file:
- SHA256:a55aece52bf91eca31468c2ee3fda0dd8747d9619e6d327731ab9336c5e73185
- SHA1:04d302c1f0143f8f2c4f7244a3d58e8e5a4f222e [weak]
- MD5Sum:7972b09bf0a15658d711d55f5f295b45 [weak]
- Filesize:1820908 [weak]
E: Failed to fetch https://provo-mirror.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_20.04/amd64/podman-plugins_1.2.0-1_amd64.deb File has unexpected size (1034528 != 1116320). Mirror sync in progress? [IP: 91.193.113.70 443]
Hashes of expected file:
- SHA256:49e09a6ff2b0b827ddc0d830edd160b4ec03875a3f8c8195bfd53b7867fd0b22
- SHA1:44470e9d5c4b64f1602d3a82f1b28e400e16796c [weak]
- MD5Sum:d5cc530c789e0fc256ecc02603ff9685 [weak]
- Filesize:1116320 [weak]
E: Failed to fetch https://provo-mirror.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_20.04/amd64/podman-machine-cni_0.0.0-1_amd64.deb File has unexpected size (1639592 != 1820908). Mirror sync in progress? [IP: 91.193.113.70 443]
Hashes of expected file:
- SHA256:a55aece52bf91eca31468c2ee3fda0dd8747d9619e6d327731ab9336c5e73185
- SHA1:04d302c1f0143f8f2c4f7244a3d58e8e5a4f222e [weak]
- MD5Sum:7972b09bf0a15658d711d55f5f295b45 [weak]
- Filesize:1820908 [weak]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
我尝试了 sudo apt-get update --fix-missing,也尝试了这,这和这结果是一样的。
我也打开了这个问题但我不确定问题出在 podman、ubuntu 还是我自己身上。
难道我做错了什么?
答案1
事实证明我的 /etc/apt/sources.list.d 中有一个不稳定的 repo:
https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/unstable/xUbuntu_22.04/
我还使用了与 podman 实际使用的版本相冲突的 crun 版本。将其从 /etc/apt/sources.list.d 中删除,调用 apt-update 并删除并重新安装 podman 解决了该问题。