修复Ubuntu 22.04下默认安装Podman后新建网络异常的问题

问题现象

1
2
sudo podman create network test
sudo podman network ls

报错提示

1
WARN[0000] Error validating CNI config file /etc/cni/net.d/test.conflist: [plugin bridge does not support config version "1.0.0" plugin portmap does not support config version "1.0.0" plugin firewall does not support config version "1.0.0" plugin tuning does not support config version "1.0.0"]

解决方案

看起来是Ubuntu2204的已知问题, 需要手动安装最新版本的containernetworking-plugins

  1. 打开下载页面, 下载最新的deb包

  2. sudo dpkg -i containernetworking-plugins_1.1.1+ds1-3build1_amd64.deb

参考

Ubuntu 22.04.1 LTS libpod (package podman 3.4.4+ds1-1ubuntu1.22.04.1): broken network functionality for CNI plugins

Podman automatically sets cniVersion 1.0.0 instead of 0.4.0

Error validating CNI config file and network errors in rootful podman #14189