E: Could not get lock /var/lib/dpkg/lock-frontend - open (11: Resource temporarly unavailable)

refering blog

当我的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,好过。

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值