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

Cause:

There is already an old yum process running on server which doesnot allow any further installs

[root@tibero tibero]# yum install ansible
Loaded plugins: security, ulninfo
Existing lock /var/run/yum.pid: another copy is running as pid 6969.
Another app is currently holding the yum lock; waiting for it to exit...
  The other application is: yum
    Memory :  23 M RSS (327 MB VSZ)
    Started: Thu Jun  3 23:13:02 2021 - 00:07 ago
    State  : Traced/Stopped, pid: 6969

Workaround:

Identify the process pid from the error message which runs in background

[root@tibero tibero]# ps -ef|grep 6969|grep -v 'grep'
root      6969  6960  1 23:13 pts/0    00:00:01 /usr/bin/python /usr/bin/yum install ansible

Kill the old yum session

[root@tibero tibero]# kill -9 6969

[root@tibero tibero]# ps -ef|grep 6969|grep -v 'grep'

[1]-  Killed                  yum install ansible

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s