Another app is currently holding the yum lock; waiting for it to exit... 怎么解决

在使用yum安装时出现类似如下情况:

[root@sjk1 ~]# yum -y install perl-DBD-MySQL
Loaded plugins: fastestmirror, langpacks
Existing lock /var/run/yum.pid: another copy is running as pid 2235.
Another app is currently holding the yum lock; waiting for it to exit...
  The other application is: yum
    Memory :  27 M RSS (887 MB VSZ)
    Started: Fri Jun 21 14:29:05 2019 - 04:06 ago
    State  : Traced/Stopped, pid: 2235
Another app is currently holding the yum lock; waiting for it to exit...
  The other application is: yum
    Memory :  27 M RSS (887 MB VSZ)
    Started: Fri Jun 21 14:29:05 2019 - 04:08 ago
    State  : Traced/Stopped, pid: 2235
Another app is currently holding the yum lock; waiting for it to exit...
  The other application is: yum
    Memory :  27 M RSS (887 MB VSZ)
    Started: Fri Jun 21 14:29:05 2019 - 04:10 ago
    State  : Traced/Stopped, pid: 2235

原因:

已经有一个yum进程在运行了,yum处在锁定状态中。

解决方案:

可以通过强制关掉yum进程(因为通过 kill -9 2235 是杀不掉的)

rm -f /var/run/yum.pid    或  rm -f /run/yum.pid

[root@sjk1 ~]# find / -name "yum.pid"
/run/yum.pid
[root@sjk1 ~]# rm -f /run/yum.pid 
 

猜你喜欢

转载自blog.csdn.net/wudinaniya/article/details/93192412
今日推荐