解决 yum 安装软件时提示被锁定

分类:CentOS运维 阅读:51728 次

有时用yum升级一些文件时,会出现以下情况:
Existing lock /var/run/yum.pid: another copy is running as pid 3046.
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...
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...
可以通过强制关掉yum进程:

rm -f /var/run/yum.pid service yum-updatesd restart

然后就可以使用yum了。