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

时间:2020-01-09 14:16:22  来源:igfitidea点击:

运行命令yum update -y报错:

Loaded plugins: fastestmirror, priorities
Existing lock /var/run/yum.pid: another copy is running as pid 523.
Another app is currently holding the yum lock; waiting for it to exit…

The other application is: yum-updatesd-he
Memory : 14 M RSS ( 26 MB VSZ)
Started: Tue Feb 9 08:19:02 2010 – 14 day(s) 11:47:39 ago
State : Sleeping, pid: 523
Another app is currently holding the yum lock; waiting for it to exit…
The other application is: yum-updatesd-he
Memory : 14 M RSS ( 26 MB VSZ)
Started: Tue Feb 9 08:19:02 2010 – 14 day(s) 11:47:41 ago
State : Sleeping, pid: 523

我该如何解决这个问题?
运行以下命令以查找与yum命令关联的进程:

# ps aux | grep -i yum

输出示例:

root       523  0.0  0.7  27128 14624 ?        SN   Feb09   0:00 /usr/bin/python -tt /usr/libexec/yum-updatesd-helper --check --email [email protected] [email protected] --smtp-server=localhost:25 --sendmail
root      2875  0.0  0.5  26456 10620 ?        SN   Jan23   0:00 /usr/bin/python -tt /usr/sbin/yum-updatesd
root     25840  0.0  0.6  24224 12800 ?        Ss   11:58   0:14 /usr/bin/python /usr/bin/yum update -y
root     26665  0.1  0.6  24228 12784 ?        Ss   20:02   0:00 /usr/bin/python /usr/bin/yum update -y
root     26785  0.0  0.0   4128   608 pts/0    S+   20:06   0:00 grep yum

杀死PID 523、25840和26665:

# kill -9 523
# killall -9 yum

现在运行以下命令:

# yum update -y

确保您启动yum-updatesd:

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