Another app is currently holding the yum lock; waiting for it to exit

Another app is currently holding the yum lock; waiting for it to exit…

报错详情:
[root@localhost debug]# sudo yum makecache
Loaded plugins: fastestmirror
Existing lock /var/run/yum.pid: another copy is running as pid 87965.
Another app is currently holding the yum lock; waiting for it to exit...
  The other application is: yum
    Memory :  26 M RSS (1.4 GB VSZ)
    Started: Tue Oct 24 10:42:45 2023 - 11:54 ago
    State  : Traced/Stopped, pid: 87965
问题分析:

Another app is currently holding the yum lock. 意为另外随侵一个应用正英篇泛在锁住进程锁。waiting for it to exit… 意为该应用等待解锁。此外,如图可以得知,yum的pid号为87965。

解决方案1:

强制关闭进程,出现该进程无法被终止的情况,进而采用kill命令

[root@localhost debug]# kill -9 87965

执行kill之后yum会自动重新运行,然后yum就恢复正常了

解决方案2:

删除pid文件

[root@localhost debug]# rm -f /var/run/yum.pid

yum.pid文件会重新自动生成,然后yum就恢复正常了

你可能感兴趣的:(1024程序员节)