apt升级docker失败

报错详情

li@docker$ sudo apt-get upgrade
正在读取软件包列表... 完成
正在分析软件包的依赖关系树       
正在读取状态信息... 完成       
正在计算更新... 完成
升级了 0 个软件包,新安装了 0 个软件包,要卸载 0 个软件包,有 0 个软件包未被升级。
有 1 个软件包没有被完全安装或卸载。
解压缩后会消耗 0 B 的额外空间。
您希望继续执行吗? [Y/n] y
正在设置 docker-ce (5:19.03.13~3-0~ubuntu-focal) ...
Job for docker.service failed because the control process exited with error code.
See "systemctl status docker.service" and "journalctl -xe" for details.
invoke-rc.d: initscript docker, action "start" failed.
● docker.service - Docker Application Container Engine
     Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
     Active: activating (auto-restart) (Result: exit-code) since Sat 2020-10-10 09:52:22 CST; 5ms ago
TriggeredBy: ● docker.socket
       Docs: https://docs.docker.com
    Process: 50240 ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock (code=exited, status=1/FAILURE)
   Main PID: 50240 (code=exited, status=1/FAILURE)
dpkg: 处理软件包 docker-ce (--configure)时出错:
 已安装 docker-ce 软件包 post-installation 脚本 子进程返回错误状态 1
在处理时有错误发生:
 docker-ce
E: Sub-process /usr/bin/dpkg returned an error code (1)

解决方式

如果是配置了国内镜像
镜像文件为/etc/docker/daemon.json
则修改文件后缀为.conf即可正常安装升级

你可能感兴趣的:(apt升级docker失败)