我无法从 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
我删除了锁定文件,但还是收到同样的消息。使用 Ubuntu 16.04。我必须强制停止,因为它永远留在这里。当我运行 dpkg -i /path/to/package.deb 时,输出是
arton@arton-Latitude-E6230:~$ sudo dpkg -i /home/arton/Downloads/amd64/docker.io_1.12.6-0ubuntu1~16.04.1A~4.2.0.201703241951_amd64.deb
[sudo] password for arton:
dpkg: error: dpkg status database is locked by another process