Existing lock /var/run/yum.pid: another copy is running as pid

时间:2019-11-20 08:53:24  来源:igfitidea点击:

在CentOS 上执行 yum update -y 时报错:

Existing lock /var/run/yum.pid: another copy is running as pid 13711
Another app is currently holding the yum lock; waiting for it to exit

解决方案

查看当前与yum命令关联的进程

# ps aux | grep -i yum

删掉相应的进程

# kill -9 1572
# killall -9 yum

确保启动了yum-updatesd:

# /etc/init.d/yum-updatesd start

重新运行yum命令:

# yum update -y