2020-08-05
报错1:
$ sudo apt update 正在读取软件包列表... 完成 E: 无法获得锁 /var/lib/apt/lists/lock - open (11: 资源暂时不可用) E: 无法对目录 /var/lib/apt/lists/ 加锁
解决:
$ sudo rm /var/lib/apt/lists/lock
报错2:
$ sudo apt upgrade E: 无法获得锁 /var/lib/dpkg/lock-frontend - open (11: 资源暂时不可用) E: 无法获取 dpkg 前端锁 (/var/lib/dpkg/lock-frontend),是否有其他进程正占用它?
解决:
$ sudo rm /var/lib/dpkg/lock-frontend
再运行upgrade 还是报错,关闭此终端,重新打开一个新终端,再更新,没有报错了。