当我的Ubuntu install某个东西时,给出下面提示
E: Could not get lock /var/lib/dpkg/lock-frontend - open (11: Resource temporarly unavailable)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), is an other process using it?
删除锁定文件,行了
sudo rm /var/lib/dpkg/lock-frontend
sudo rm /var/lib/dpkg/lock
according to the error which the shell displays,for example,it shows"Uable...lock(/var/lib/dpkg/lock)",then we use command
sudo rm /var/lib/dpkg/lock
if it shows"Uable...lock(/var/lib/dpkg/lock-frontend)",then we use command
sudo rm /var/lib/dpkg/lock-frontend
we just need to remove the file it shows. use the cmmoand line "sudo rm ..."
分析
Ubuntu中Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend)问题的解决
进程列表中已经没有与apt,apt-get相关的进程在运行,但依然报错,在这种情况下,产生错误的根本原因是lock file。 loack file用于防止两个或多个进程使用相同的数据。 当运行apt或apt-commands时,它会在几个地方创建lock files。 当前一个apt命令未正确终止时,lock file未被删除,因此它们会阻止任何新的apt / apt-get命令实例,比如正在执行apt-get upgrade,在执行过程中直接ctrl+c取消了该操作,很有可能就会造成这种情况。
要解决此问题,首先要删除lock file。
有时候删除这种方法还是报错,报错里面有提示不被允许之类的,使用sudo apt-get update,好过。