Ubuntu系统安装软件时出现:E: Could not get lock /var/lib/dpkg/lock解决方法

Ubuntu系统安装软件时出现:E: Could not get lock /var/lib/dpkg/lock解决方法

在Ubuntu系统中安装软件时出现:

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?
在这里插入图片描述

错误导致安装失败时,解决方案如下:

在终端中输入指令:

sudo rm /var/lib/dpkg/lock

在这里插入图片描述
然后再次输入安装软件指令即可。

如果再次出现如下错误:

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?
在这里插入图片描述
则再次使用以上指令将lock-frontend删除即可:

sudo rm /var/lib/dpkg/lock-frontend

在这里插入图片描述
接下来就可以继续进行安装指令了。

发布了45 篇原创文章 · 获赞 15 · 访问量 2万+

猜你喜欢

转载自blog.csdn.net/CHQC388/article/details/103943322