Ubuntu: E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)

Ubuntu在进行apt-get install 会出现下面的提示

 

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?

 

原因就是可以理解为进程锁吧。

1.重启你的系统,要么你就kill apt相关的东西

2.删掉文件

rm /var/lib/dpkg/lock

rm /var/lib/apt/lists/lock

rm /var/cache/apt/archives/lock

重新

apt-get update

你可能感兴趣的:(linux)