ubuntu更新软件时
apt-get upgrade
遇到
E: 无法获得锁 /var/lib/dpkg/lock-frontend - open (11: 资源暂时不可用)E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), is another process using it?
解决办法:
1.kill进程【无效】
ps -e | grep apt
1405 ? 00:00:00 apt.systemd.dai 1457 ? 00:00:00 apt.systemd.dai
root@rain99-virtual-machine:~# kill 1405root@rain99-virtual-machine:~# kill 1457
2.rm删除锁【有效】
sudo rm /var/lib/dpkg/lock-frontend
总结:
无法获得锁xxx/xxx
直接rm xxx/xxx
参考: