简介
这个问题也是经常会碰到的一个问题,在yum命令时,会报错“Another app is currently holding the yum
lock”,这该如何解决yum进行锁定的问题呢,其实yum一次只能安装一个软件,过多执行则会提示占进程锁定。

教程
我们来看下例子,先列出
yum list
可以看到报错的PID
Loaded plugins: fastestmirror, langpacks
Existing lock /var/run/yum.pid: another copy is running as pid 13023.
Another app is currently holding the yum lock; waiting for it to exit...
The other application is: PackageKit
Memory : 26 M RSS (430 MB VSZ)
Started: Sat Sep 30 18:31:21 2022 - 00:33 ago
State : Sleeping, pid: 13023
我们来查看一下这个PID,看看哪个进程让yum进程锁定了
ps -ef | grep 13023
root 13023 11813 3 18:31 ? 00:00:04 /usr/bin/python /usr/share/PackageKit/helpers/yum/yumBackend.py
我们来杀掉进程就可以解决
kill -9 13023
或者
pkill PackageKit
![vultr加拿大机房怎么样?[2022年] vultr加拿大机房简单测评分享](https://img.ivpsr.com/wp-content/uploads/2021/05/1619837326-5d518828ff221e1.jpg)
![gcorelabs:巴西VPS深度测评[2023],gcorelabs巴西怎么样,实测数据分享](https://img.ivpsr.com/wp-content/uploads/2022/12/gcorelabs01.jpg)







