问题描述:
在运行yum命令时,提示"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... " 错误信息,具体内容如下:
Another app is currently holding the yum lock; waiting for it to exit...
The other application is: yum
Memory : 37 M RSS (271 MB VSZ)
Started: Thu Nov 24 11:19:33 2016 - 00:01 ago
State : Traced/Stopped, pid: 8907
Another app is currently holding the yum lock; waiting for it to exit...
The other application is: yum
Memory : 37 M RSS (271 MB VSZ)
Started: Thu Nov 24 11:19:33 2016 - 00:02 ago
State : Traced/Stopped, pid: 8907
Another app is currently holding the yum lock; waiting for it to exit...
The other application is: yum
Memory : 37 M RSS (271 MB VSZ)
Started: Thu Nov 24 11:19:33 2016 - 00:03 ago
State : Traced/Stopped, pid: 8907
解决办法:
1.杀掉yum进程
第一步,查找yum进程的PID
ps -ef | grep yum
得到下面的结果:
root 1985 1650 0 16:42 pts/0 0:00 grep --color=auto yum
root 5804 1 0 2017 ? 00:00:00 /usr/bin/python /usr/bin/yum update
其中5804就是yum进程的PID
第二步,使用kill命令杀掉进程:
kill -9 5804
2.删除yum的pid文件
rm -f /var/run/yum.pid
示例操作:
第一种情况,通过杀掉yum进程的方式来解决问题。
ps -ef | grep yum
# 得到yum进程的PID
kill -9 5804
第二种情况,通过删除yum的pid文件来解决问题。
rm -f /var/run/yum.pid
注意:
以上两种方法都需要用root用户执行。
本站文章如无特殊说明,均为本站原创,如若转载,请注明出处:linux中yum update被占用(Another app is currently holding the yum lock)的解决办法 - Python技术站