使用sudo apt-get install xxx 时出现以下报错
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?
解决方式:
ps -A|grep apt
查询出apt相关的进程,然后使用下面命令终止这些进程。
sudo kill -9 查询到的进程号
删除 /var/lib/dpkg/lock 下的文件
sudo rm /var/lib/dpkg/lock
更新
apt update
之后再使用apt命令安装软件。
[Linux] apt 安装软件出现 Could not get lock /var/lib/dpkg/lock 问题解决方法
原文:https://www.cnblogs.com/doitjust/p/14680081.html