BUG in Ubuntu--Could not get lock /var/lib/dpkg/lock

在ubuntu中通过apt安装软件时,报错:

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?

发现是因为另外一个程序在运行,导致资源被锁,可能是因为上次安装软件时出错,没有结束上次安装。

解决办法:

xx@ubuntu:~$ sudo rm /var/cache/apt/archives/lock
xx@ubuntu:~$ sudo rm /var/lib/dpkg/lock

再次安装就可以了

posted @ 2019-03-12 16:24  闲不住的小李  阅读(133)  评论(0编辑  收藏  举报