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

Posted 爷的眼睛闪亮

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了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?

出现这个问题可能是有另外一个程序正在运行,导致资源被锁不可用。而导致资源被锁的原因可能是上次运行安装或更新时没有正常完成,进而出现此状况

解决方案:

在终端中敲入以下两句
sudo rm /var/cache/apt/archives/lock
sudo rm /var/lib/dpkg/lock





以上是关于linux 遇见错误Could not get lock /var/lib/dpkg/lock的主要内容,如果未能解决你的问题,请参考以下文章

linux 系统filezilla无法上传文件 553 Could not create

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

Linux重启mysql Error getting authority: Error initializing authority: Could not connect: Resource tem

Linux实战问题解决方案:Could not get lock

ubuntu 安装软件时could not get lock 错误解决办法

Could not get a resource from the pool 错误解决