apt install tree
E: Could not get lock /var/lib/dpkg/lock-frontend - open (11: Resource temporarily unavailable)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), is another process using it?
root@debian:/# rm -rf /var/lib/dpkg/lock-frontend
root@debian:/# apt install tree
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?
root@debian:/# rm -rf /var/lib/dpkg/lock
root@debian:/# apt install tree
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
tree
0 upgraded, 1 newly installed, 0 to remove and 569 not upgraded.
apt install tree
E: Could not get lock /var/lib/dpkg/lock-frontend - open (11: Resource temporarily unavailable)
建议rm -rf 之前备份一下要删除的文件。