apt报错:无法获得锁 /var/lib/dpkg/lock-frontend - open (11: 资源暂时不可用
# apt-get install bridge-utils
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的进程
# ps -ef | grep apt
root 3334 1 0 23:19 ? 00:00:00 /bin/sh /usr/lib/apt/apt.systemd.daily install
root 3348 3334 0 23:19 ? 00:00:00 /bin/sh /usr/lib/apt/apt.systemd.daily lock_is_held install
_apt 3431 3380 0 23:20 ? 00:00:00 /usr/lib/apt/methods/http
root 3435 3059 0 23:20 pts/8 00:00:00 grep --color=auto apt
# kill -9 3334 3348 3431
# ps -ef | grep apt
root 3440 3059 0 23:21 pts/8 00:00:00 grep --color=auto apt
- 删除解锁文件
# rm /var/cache/apt/archives/lock
# rm /var/lib/dpkg/lock