标题: Linux apt安装停滞的解决办法 [打印本页] 作者: linda 时间: 2022-11-22 16:33 标题: Linux apt安装停滞的解决办法
如果之前有一个apt或apt-get进程正在运行,之后的apt将无法运行,并提示
Waiting for cache lock: Could not get lock /var/lib/dpkg/lock-frontend. It is held by process 43843 (unattended-upgrade)
但此错误信息批处理里可能看不到。
此时需要终止该进程,才能运行下一个apt程序
kill -9 43843
预警检查:
apt-get check >/dev/null 2>&1
if [ "$?" -ne 0 ]; then
echo "you may have broken packages. Aborting..."
fi