解决 Ubuntu apt-get Could not get lock varlibdpkglock-frontend

解决 Ubuntu apt-get Could not get lock /var/lib/dpkg/lock-frontend.

E: Could not get lock /var/lib/dpkg/lock-frontend.  It is held by process 1927 (unattended-upgr)
N: Be aware that removing the lock file is not a solution and may break your system.
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), is another process using it?
  • 解决方案
sudo rm /var/lib/dpkg/lock-frontend
sudo rm /var/lib/dpkg/lock
sudo rm /var/cache/apt/archives/lock

然后使用apt-get安装就可以了

posted @ 2022-12-27 15:54  Yiersansi_1221  阅读(48)  评论(0)    收藏  举报