Hello welcome to Yzone.net

subprocess installed post-installation script returned error

(ubuntu)安装docker时因为突然ssh断开,再次登录继续操作时出现 subprocess installed post-installation script returned error

参考命令提示 执行:sudo dpkg --configure -a。还是卡在了 Setting up docker-engine (1.12.2-0~xenial) ... 这里。 使用CTRL+c强制退出执行后就会出现

subprocess installed post-installation script returned error
...
Errors were encountered while processing:
 docker-engine

解决:

查询网上资料,进入 /var/lib/dpkg/info,将卡住的相关文件删除

$ ll /var/lib/dpkg/info | grep dock
-rw-r--r-- 1 root root      61 Oct 11 18:31 docker-engine.conffiles
-rw-r--r-- 1 root root    5588 Oct 18 07:14 docker-engine.list
-rw-r--r-- 1 root root    8552 Oct 11 18:31 docker-engine.md5sums
-rwxr-xr-x 1 root root    3334 Oct 11 18:31 docker-engine.postinst*
-rwxr-xr-x 1 root root    1290 Oct 11 18:31 docker-engine.postrm*
-rwxr-xr-x 1 root root     513 Oct 11 18:31 docker-engine.preinst*
-rwxr-xr-x 1 root root     201 Oct 11 18:31 docker-engine.prerm*
$ sudo rm -f /var/lib/dpkg/info/docker-engine.*

执行下清理等命令

sudo apt-get autoclean && apt-get autoremove
sudo apt-get update

重新安装:

sudo apt-get remove docker-engine
sudo apt-get install docker-engine

OK.

参考:reader8.cn


分类 docker    标签 docker , linux , ubuntu
文档结构