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?
1.进程占用 使用
ps -A | grep apt sudo kill -9 进程号 可以解决
2. 意外关机,文件被锁定 ubuntu出现多,此时
$ sudo rm /var/lib/dpkg/lock
删除被锁定文件夹就可以