podman容器启动Error: unable to start container “***“: container create failed (no logs from conmon): EOF

笔者在电脑上使用podman创建容器并命名为container_20220506_142904,可以正常进入容器中。但后来重启电脑后,发现不能再启动容器:

$ podman start container_20220506_142904 
Error: unable to start container "container_20220506_142904": container create failed (no logs from conmon): EOF

实际上手动关闭容器后再启动现象一致:

$ podman ps
CONTAINER ID  IMAGE                                                     COMMAND  CREATED       STATUS           PORTS                  NAMES
20bfffc9b4e1  localhost/ambacontainer_1804_cuda10.2_cudnn7/sdk:2.4.1.0  bash     20 hours ago  Up 20 hours ago  0.0.0.0:60040->22/tcp  container_20220506_142904

$ podman stop container_20220506_142904
20bfffc9b4e13f4ca15b9418f67f50f40b80e9c06cc969d81e9381166519394b

$ podman ps
CONTAINER ID  IMAGE   COMMAND  CREATED  STATUS  PORTS   NAMES

$ podman start container_20220506_142904
Error: unable to start container "container_20220506_142904": container create failed (no logs from conmon): EOF

查看podman版本,版本是V1.6.2,并且有警告存在:

$ podman --version
podman version 1.6.2
WARN[0000] unable to find /home/slf/.config/containers/registries.conf. some podman (image shortnames) commands may be limited

怀疑是podman版本过低,官网已更新到V4.0.2,因此尝试升级。但卸载podman(镜像和容器均无需备份)后再安装时却发现在Ubuntu18.04找不到podman软件包:

$ sudo apt install podman
正在读取软件包列表... 完成
正在分析软件包的依赖关系树       
正在读取状态信息... 完成       
没有可用的软件包 podman,但是它被其它的软件包引用了。
这可能意味着这个缺失的软件包可能已被废弃,
或者只能在其他发布源中找到
E: 软件包 podman 没有可安装候选

$ sudo apt-get install podman
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package podman

进入podman官网阅读​​​安装指南,提示官方仓库中的软件包仅支持Ubuntu20.10及之后版本。但下图红框位置却又出现第三方kubic软件源:

打开第三方软件仓库确认Ubuntu18.04存在:

 因此参照其写了一个含有如下内容的脚本(命令行可逐条执行):

sudo apt install -y curl  //若未安装curl时执行
. /etc/os-release
echo "deb https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_${VERSION_ID}/ /" | sudo tee /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list
curl -L https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_${VERSION_ID}/Release.key | sudo apt-key add -
sudo apt update
sudo apt -y install podman

执行脚本成功安装podman,且版本是V3.0.1

$ which podman
/usr/bin/podman

$ podman --version
podman version 3.0.1

然后再次启动容器,未再报之前遇到的错误,一切正常,执行podman --help发现支持的commands也多了一些。

  

查看系统版本:

$ cat /etc/os-release
NAME="Ubuntu"
VERSION="18.04.6 LTS (Bionic Beaver)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 18.04.6 LTS"
VERSION_ID="18.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=bionic
UBUNTU_CODENAME=bionic

$ lsb_release -a
No LSB modules are available.
Distributor ID:    Ubuntu
Description:    Ubuntu 18.04.6 LTS
Release:    18.04
Codename:    bionic

$ uname -a
Linux dell-inspiron7590 5.4.0-97-generic #110~18.04.1-Ubuntu SMP Mon Jan 17 20:50:31 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

  

郑重提示:①本文不允许转载,若认可本文,可点赞收藏。

                      ②若有疑问,可在评论区留言相互讨论。

  • 3
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值