Open fighcn opened 4 years ago
Could not open lock file/var/lib/dpkg/lock的解决
在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
运行以上四条命令即可
在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
运行以上四条命令即可