Ubuntu/Debian系统环境中,有时候无论是执行update升级源软件的,还是进行其他软件安装的时候都有出现”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?

解决的办法:

rm /var/cache/apt/archives/lock
rm /var/lib/dpkg/lock

删除这两个文件,之后在apt-get update -y升级源之后执行需要操作的软件就可以解决问题。

转自:http://www.laozuo.org/12157.html