我无法从 dpkg 中删除锁,并且docker-ce
安装似乎中途停止:
$ sudo rm /var/lib/apt/lists/lock
$ sudo rm /var/cache/apt/archives/lock
$ sudo apt install aptitude
E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)
E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?
$ sudo rm -R /var/lib/dpkg/lock
$ sudo rm /var/lib/dpkg/lock
rm: cannot remove '/var/lib/dpkg/lock': No such file or directory
$ sudo rm /var/lib/dpkg/lock
rm: cannot remove '/var/lib/dpkg/lock': No such file or directory
$ sudo rm /var/lib/apt/lists/lock
rm: cannot remove '/var/lib/apt/lists/lock': No such file or directory
$ sudo dpkg --configure -a
Setting up docker-ce (17.06.2~ce-0~ubuntu) ...
^Cdpkg: error processing package docker-ce (--configure):
subprocess installed post-installation script was interrupted
Errors were encountered while processing:
docker-ce
我已删除lock
文件,但仍然收到相同消息。使用 Ubuntu 16.04。
答案1
您已删除包管理器日志,但包配置仍中断。您需要使用 从头开始重新安装 docker 包dpkg -i /path/to/package.deb
。
这不会解决 Docker 安装的原始问题。请提出新问题为此,并包括安装命令的输出。谢谢。