在ubuntu系统中利用apt-get install something的时候,有时候会出现无法获得锁的权限问题。这是因为有另外一个进程在占用锁。类似以下的错误提示:
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 rm -rf /var/lib/dpkg/lock
sudo rm -rf /var/cache/apt/archives/lock
sudo apt-get update
sudo dpkg --configure -a
运行以上四条命令
原文地址:https://www.cnblogs.com/dayspring/p/11805100.html
时间: 2024-11-05 19:13:01