树莓派3B(DietPi系统)安装Podman后运行报错求助
解决DietPi(树莓派3B)下Podman运行
hello-world报错的问题 问题根源
这个错误由两个核心缺失导致:
- DietPi默认未预装
systemd相关总线组件,Podman依赖sd-bus实现进程间通信 - OCI runtime(如
runc)未安装,Podman找不到启动容器的运行环境
修复步骤
1. 安装必要依赖
先更新包列表,再安装缺失的组件:
sudo apt-get update sudo apt-get install -y libsystemd0 runc
2. 指定Podman使用runc作为默认runtime
编辑Podman的配置文件:
sudo nano /etc/containers/containers.conf
在文件中添加或修改以下内容:
[engine] runtime = "runc"
保存退出(按Ctrl+O确认,回车,再按Ctrl+X退出编辑器)
3. 重启服务或系统
让配置生效:
sudo systemctl restart podman # 直接重启系统也能确保配置完全生效 sudo reboot
4. 重新测试
再次运行hello-world验证:
sudo podman run hello-world
备选方案(若上述步骤无效)
DietPi默认使用dietpi-services替代systemd,可能导致Podman依赖不兼容,可尝试切换到systemd模式:
sudo dietpi-services mode systemd
切换完成后重启系统,再重新执行Podman命令。
内容的提问来源于stack exchange,提问作者Lightswitch
相关产品推荐
相关产品推荐

