解决ubuntu中“Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), is another proce..

随手笔记:

在Ubuntu中经常会由于某些不知名原因导致进程被锁,甚至在关机时也会造成冲突。

在使用 apt-get时,会提示以下内容:

E: 无法获得锁 /var/lib/dpkg/lock-frontend - open (11: 资源暂时不可用)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), is another process using it?

 

我从网上看了许多文章,发现网上提到的杀死进程的方法一般来说都没有什么用,只有一招最管用了(亲测有效)就是重启系统(并非为重装系统)。

具体操作如下:

sudo systemctl --force reboot


这个会重新启动系统,所以使用前切记保存需要保存的文件。

重新启动系统后就可以顺利使用apt-get下载东西了,有问题的小伙伴快去尝试一下吧。

你可能感兴趣的:(Linux,Ubuntu,ubuntu,linux)