美文网首页
修复Could not get lock /var/cache/

修复Could not get lock /var/cache/

作者: M4K0 | 来源:发表于2018-12-14 09:05 被阅读14次

问题描述:

sudo apt-get install  python-pip
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?

解决方案:

sudo killall apt-get
#如果上述命令无效,使用下面几条:
sudo rm /var/lib/apt/lists/lock
sudo rm /var/cache/apt/archives/lock
sudo rm /var/lib/dpkg/lock
sudo dpkg --configure -a

详细原理:
参考https://itsfoss.com/fix-ubuntu-install-error/

相关文章

网友评论

      本文标题:修复Could not get lock /var/cache/

      本文链接:https://www.haomeiwen.com/subject/ebrwhqtx.html