Waiting for cache lock: Could not get lock /var/lib/dpkg/lock-frontend.

问题

1、apt remove  net-tools

Waiting for cache lock: Could not get lock /var/lib/dpkg/lock-frontend.

 

 

2、结束这个占用的进程

root@ubuntu01:~# kill -9 5937

 

3、测试

root@ubuntu01:~# apt remove net-tools

 

 

4、结束这个占用进程

root@ubuntu01:~# kill -9 7462

 

5、测试

root@ubuntu01:~# apt remove net-tools
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be REMOVED:
  net-tools
0 upgraded, 0 newly installed, 1 to remove and 176 not upgraded.
After this operation, 864 kB disk space will be freed.
Do you want to continue? [Y/n] y   
(Reading database ... 150487 files and directories currently installed.)
Removing net-tools (1.60+git20180626.aebd88e-1ubuntu1) ...
Processing triggers for man-db (2.9.1-1) ...

可以了。

 

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。