加载中......

docker卸载与安装

sudo apt remove docker.io

 报错如下:

Reading package lists... Done
Building dependency tree
Reading state information... Done
The following package was automatically installed and is no longer required:
  aufs-tools
Use 'sudo apt autoremove' to remove it.
The following packages will be REMOVED:
  docker.io*
0 upgraded, 0 newly installed, 1 to remove and 1 not upgraded.
1 not fully installed or removed.
After this operation, 29.1 MB disk space will be freed.
Do you want to continue? [Y/n] Y
(Reading database ... 29980 files and directories currently installed.)
Removing docker.io (1.6.2~dfsg1-1ubuntu4~14.04.1) ...
invoke-rc.d: could not determine current runlevel
 * Stopping Docker: docker
No process in pidfile '/var/run/docker-ssd.pid' found running; none killed. invoke-rc.d: initscript docker, action "stop" failed. dpkg: error processing package docker.io (--remove): installed docker.io package pre-removal script subprocess returned error exit status 1 dpkg: error while cleaning up: installed docker.io package post-installation script subprocess returned error exit status 1 Errors were encountered while processing: docker.io E: Sub-process /usr/bin/dpkg returned an error code (1)

 解决办法:

sudo rm -rf /var/lib/dpkg/info/docker.io.*

 

In /var/lib/dpkg/info/,find file like docker.io.*,and delete them all,then redo the remove action,it will be ok.

I just remove the openssh-server and solvethe same problem,I hope it helps.

 

安装最新docker

 

 

参考资料

https://unix.stackexchange.com/questions/118587/subprocess-installed-pre-removal-script-returned-error-exit-status-1

https://www.jianshu.com/p/d1b2b4240256

posted @ 2019-03-27 13:21  青蛙快飞  阅读(5255)  评论(0编辑  收藏  举报