![在“无法获得锁定”后删除锁定,现在我得到“安装后脚本被中断”](https://linux22.com/image/1002847/%E5%9C%A8%E2%80%9C%E6%97%A0%E6%B3%95%E8%8E%B7%E5%BE%97%E9%94%81%E5%AE%9A%E2%80%9D%E5%90%8E%E5%88%A0%E9%99%A4%E9%94%81%E5%AE%9A%EF%BC%8C%E7%8E%B0%E5%9C%A8%E6%88%91%E5%BE%97%E5%88%B0%E2%80%9C%E5%AE%89%E8%A3%85%E5%90%8E%E8%84%9A%E6%9C%AC%E8%A2%AB%E4%B8%AD%E6%96%AD%E2%80%9D.png)
我无法从 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 安装的原始问题。请提出新问题为此,并包括安装命令的输出。谢谢。