在使用yum安装时提示“Another app is currently holding the yum lock; waiting for it to exit...”

如下:

[root@iZ8vb7grbyvlb154qzo6nyZ ~]# yum install jenkins-2.204.1-1.1.noarch.rpm -y
Loaded plugins: fastestmirror
Existing lock /var/run/yum.pid: another copy is running as pid 414.
Another app is currently holding the yum lock; waiting for it to exit...
  The other application is: yum
    Memory :  55 M RSS (534 MB VSZ)
    Started: Mon Jul 20 17:15:20 2020 - 01:43 ago
    State  : Traced/Stopped, pid: 414
Another app is currently holding the yum lock; waiting for it to exit...
  The other application is: yum
    Memory :  55 M RSS (534 MB VSZ)
    Started: Mon Jul 20 17:15:20 2020 - 01:45 ago
    State  : Traced/Stopped, pid: 414
Another app is currently holding the yum lock; waiting for it to exit...
  The other application is: yum
    Memory :  55 M RSS (534 MB VSZ)
    Started: Mon Jul 20 17:15:20 2020 - 01:47 ago
    State  : Traced/Stopped, pid: 414
Another app is currently holding the yum lock; waiting for it to exit...
  The other application is: yum
    Memory :  55 M RSS (534 MB VSZ)
    Started: Mon Jul 20 17:15:20 2020 - 01:49 ago
    State  : Traced/Stopped, pid: 414
Another app is currently holding the yum lock; waiting for it to exit...
  The other application is: yum
    Memory :  55 M RSS (534 MB VSZ)
    Started: Mon Jul 20 17:15:20 2020 - 01:51 ago
    State  : Traced/Stopped, pid: 414
Another app is currently holding the yum lock; waiting for it to exit...
  The other application is: yum
    Memory :  55 M RSS (534 MB VSZ)
    Started: Mon Jul 20 17:15:20 2020 - 01:54 ago
    State  : Traced/Stopped, pid: 414

yum在安装时卡主,直接强制退出了,再次安装时,提示yum被锁,遇到这种情况,可以查看执行中进程,然后直接删除进程。

[root@iZ8vb7grbyvlb154qzo6nyZ ~]# ps aux|grep yum
root       414  1.8  5.7 547044 55840 pts/1    T    17:15   0:03 /usr/bin/python /usr/bin/yum install jenkins-2.138.4-1.1.noarch.rpm -y
root       517  0.2  2.2 349248 22116 pts/1    T    17:16   0:00 /usr/bin/python /usr/bin/yum install jenkins-2.204.1-1.1.noarch.rpm -y
root       612  0.0  0.1 112704   972 pts/1    R+   17:18   0:00 grep --color=auto yum
[root@iZ8vb7grbyvlb154qzo6nyZ ~]# kill -9 414
[root@iZ8vb7grbyvlb154qzo6nyZ ~]# kill -9 517
[root@iZ8vb7grbyvlb154qzo6nyZ ~]# ps aux|grep yum
root       646  0.0  0.1 112704   972 pts/1    R+   17:18   0:00 grep --color=auto yum

删除后,再重新安装即可。

[root@iZ8vb7grbyvlb154qzo6nyZ ~]# yum install jenkins-2.204.1-1.1.noarch.rpm -y
...
...
...
Running transaction
  Installing : jenkins-2.204.1-1.1.noarch                                                                                                    1/1 
  Verifying  : jenkins-2.204.1-1.1.noarch                                                                                                    1/1 

Installed:
  jenkins.noarch 0:2.204.1-1.1                                                                                                                   

Complete!

ok,成功安装。

Logo

权威|前沿|技术|干货|国内首个API全生命周期开发者社区

更多推荐