解决Could not get lock /var/cache/apt/archives/lock

Posted 大老虎打老虎

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了解决Could not get lock /var/cache/apt/archives/lock相关的知识,希望对你有一定的参考价值。

在ubuntu apt-get upgrade的时候,遇到:

E: Could not get lock /var/cache/

apt/archives/lock - open (11 Resource temporarily unavailable)
E: Unable to lock the download directory

出现这种问题可能是因为异常停止了运行中的程序,锁没有被释放导致,有两种办法

1.sudo rm -rf /var/cache/apt/archives/lock 把这个文件删掉就好了

2.exit终端再重新打开

以上是关于解决Could not get lock /var/cache/apt/archives/lock的主要内容,如果未能解决你的问题,请参考以下文章

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

解决Could not get lock /var/cache/apt/archives/lock

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

Could not get lock /var/lib/dpkg/lock-frontend解决

Could not get lock /var/lib/dpkg/loc解决办法

关于Ubuntu中Could not get lock /var/lib/dpkg/lock解决方案