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

2017-04-23 12:41
小编在ubuntu安装某软件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?

出现原因:之前手残,不小ctr+c取消了安装进行,但是系统还在继续安装

解决方法

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