Linux——解决问题:waiting for cache lock: Could not get lock /var/lib/dpkg/lock-frontend. It is held by pr

在Linux操作系统下使用命令sudo apt install安装包时报错:waiting for cache lock: Could not get lock /var/lib/dpkg/lock-frontend. It is held by process 2715 (unattended-upgr)… 173s

在这里插入图片描述

出现该问题,是因为另一个进程正在使用 apt 命令,导致无法获取锁来执行的命令。可以结束在使用apt命令的进程后再安装。结束指定进程的详细方法,看我另外一篇博客,链接为:Linux下使用kill结束进程

结束使用apt进程后再安装就没问题了,如下:

在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/qq_40280673/article/details/134570091