ubuntu解决Could not get lock /var/lib/dpkg/lock-frontend

出现了下面的错误

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?

解决方法如下,执行脚本

#!/bin/bash
sudo killall apt apt-get
sudo rm /var/lib/apt/lists/lock
sudo rm /var/cache/apt/archives/lock
sudo rm /var/lib/dpkg/lock*
sudo dpkg --configure -a
sudo apt update

 

posted on 2024-09-21 06:32  弘道者  阅读(79)  评论(0编辑  收藏  举报