ubuntu 提示 Could not get lock /var/lib/dpkg/lock-frontend

  • Post author:
  • Post category:其他


学习笔记

Waiting for cache lock: Could not get lock /var/lib/dpkg/lock-frontend. It is held by process 2740 (unattended-upgr)

1.杀死进程

sudo kill 2740

2.删除导致锁定的文件:

sudo rm /var/lib/dpkg/lock

3.再次进行 apt upgrade 就正常了

sudo apt upgrade