解决ubuntu在apt-get install时出错Could not get lock /var/lib/dpkg/lock-frontend

sudo apt-get install 时会报错

1
2
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?

解决方法:依次执行如下命令
1
sudo rm /var/lib/apt/lists/lock

1
sudo rm /var/cache/apt/archives/lock

1
sudo rm /var/lib/dpkg/lock*


解决ubuntu在apt-get install时出错Could not get lock /var/lib/dpkg/lock-frontend
https://qiangsun89.github.io/2023/03/03/解决ubuntu在apt-get-install时出错Could-not-get-lock-var-lib-dpkg-lock-frontend/
作者
Qiang Sun
发布于
2023年3月3日
许可协议