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?
如提示所言,原因其实明显是有其他的程序正在使用它。想到刚才apt-get install没有完成就关闭了终端,应该是它导致的。
ps aux | grep apt-get
sudo kill PID
sudo rm /var/cache/apt/archives/lock
sudo rm /var/lib/dpkg/lock
备注:可先尝试方法一,无效时使用方法二。在使用第二种方法后如果仍然出现报错,但是查看进程发现并没有apt-get进程信息,此时通过重启系统,再重新安装软件,发现可以成功安装。
原文:https://www.cnblogs.com/letisl/p/11853489.html