修复Could not get lock /var/cache/

2018-12-14  本文已影响14人  M4K0

问题描述:

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/

上一篇下一篇

猜你喜欢

热点阅读