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

在安装软件包时如果出现Could not get lock /var/lib/dpkg/lock-frontend,说明之前使用apt时出现异常,没有正常关闭,还在运行。

[email protected]:~$ sudo apt-get install alien
[sudo] password for lgj:
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?

解决,使用ps 和 grep查找apt的pid,并使用kill杀死掉。

[email protected]:~$  ps afx|grep apt
16214 ?        S      0:00  \_ sudo apt install rpm
16215 ?        S      0:01  |   \_ apt install rpm
16721 pts/3    S+     0:00          \_ grep --color=auto apt
[email protected]-Lenovo-G470:~$ kill 16214
bash: kill: (16214) - Operation not permitted
[email protected]-Lenovo-G470:~$ sudo kill 16214
[email protected]-Lenovo-G470:~$ sudo kill 16215

执行安装指令

[email protected]:~$ sudo apt-get install alien
E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)
E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?

如果仍然出现,需要手动删除 /var/lib/dpkg/lock即可。

[email protected]:~$ rm -rf /var/lib/dpkg/lock

原文地址:https://www.cnblogs.com/lgjlife/p/11029463.html

时间: 2024-10-12 04:39:25

Could not get lock /var/lib/dpkg/lock-frontend解决的相关文章

linux 遇见错误Could not get lock /var/lib/dpkg/lock

通过终端安装程序sudo apt-get install xxx时出错:E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it? 出现这个问题可能是有另外一个程序正在运行,导致资源被锁不可用.而导致

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

出现这个问题的原因可能是有另外一个程序正在运行,导致资源被锁不可用.而导致资源被锁的原因,可能是上次安装时没正常完成,而导致出现此状况. 解决方法:输入以下命令 sudo rm /var/cache/apt/archives/lock sudo rm /var/lib/dpkg/lock 之后再安装想装的包,即可解决 今天玩ubuntu的时候,在弄更新源的时候,突然出现以下错误: [1]+ Stopped                 sudo apt-get update[email pro

ubuntu常见错误--Could not get lock /var/lib/dpkg/lock解决

通过终端安装程序sudo apt-get install xxx时出错:(或者卸载的时候) E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it? 出现这个问题可能是有另外一个程序正在运行,导致资

【ubuntu 】常见错误--Could not get lock /var/lib/dpkg/lock

ubuntu 常见错误--Could not get lock /var/lib/dpkg/lock 通过终端安装程序sudo apt-get install xxx时出错: E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)E: Unable to lock the administration directory (/var/lib/dpkg/), is another

(八)ubuntu安装软件提示:Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)

question: [email protected]:/usr/src/Linux-headers-3.5.0-23-generic$ sudo apt-get install cheese [sudo] password for ubuntu: E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)E: Unable to lock the administration di

E: Could not get lock /var/lib/dpkg/lock

E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable) E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it? 刚装好的ubuntu系统准备更新资源出现了一个这样的问题 出现这个问题的原因可能是有另外一个程序正在运行,导致资源被锁不可用.而导致资源被

ubuntu更新出错--Could not get lock /var/lib/dpkg/lock

ubuntu在vps上安装好后,通常第一个命令是更新系统软件.然而在运行的过程中,却出现这样的错误: E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it? 出现这个问题可能是有另外一个程序正在运

解决apt-get的E: Could not get lock /var/lib/dpkg/lock方法

使用apt-get进行软件的install或update时,有时会出现以下提示信息: E: Could not get lock /var/lib/dpkg/lock - open (11 Resource temporarily unavailable) E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it? 原因是有可能有其他的apt-get进程在活动. 解决办

ubuntu下安装软件Could not get lock /var/lib/dpkg/lock错误

今天在ubuntu安装ssh的时候报了下面的错误: E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable) E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it? 查了一下,出现此错误的原因一是有别的资源在安装,二是上一次安装没有正常退出导致锁没有释

ubuntu 常见错误--Could not get lock /var/lib/dpkg/lock

通过终端安装程序sudo apt-get install xxx时出错: E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable) E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it? 出现这个问题可能是有另外一个程序正在运行,导致资源被锁不可用.而