【Linux极简教程】常见实用命令不断更新中......
- 常见问题
- 1.Waiting for cache lock: Could not get lock /var/lib/dpkg/lock. It is held by process xxxx(dpkg)
常见问题
1.Waiting for cache lock: Could not get lock /var/lib/dpkg/lock. It is held by process xxxx(dpkg)
原因解释:有的后台程序真正使用apt
解决方法:在终端中输入下面的指令
sudo killall apt 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
最后更新apt
sudo apt update