当我安装某个软件的时候,发现报错安装不了:
$ sudo apt-get install git
E: Could not get lock /var/lib/dpkg/lock-frontend - open (11: Resource temporarily unavailable)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), is another process using it?
解决方法:
1、先杀死所有的apt或apt-get占用的进程
$ sudo killall apt apt-get
然后再尝试后,发现还是不行。
2、执行以下命令:
$ sudo rm /var/lib/apt/lists/lock
$ sudo rm /var/cache/apt/archives/lock
$ sudo rm /var/lib/dpkg/lock*
3、然后配置package:
$ sudo dpkg --configure -a
4、最后更新软件包:
$ sudo apt-get update
这时就能够正常安装软件: