How To Fix Another App Is Currently Holding The Yum Lock Waiting For It To Exit Error

When i install tigervnc server in CentOS with yum command # yum install tigervnc tigervnc-server -y, i meet below error messages.

Loaded plugins: fastestmirror, langpacks
Existing lock /var/run/yum.pid: another copy is running as pid 3339.

Another app is currently holding the yum lock; waiting for it to exit...

  The other application is: PackageKit

    Memory :  36 M RSS (925 MB VSZ)

    Started: Thu Mar 12 11:08:33 2020 - 00:12 ago

    State  : Sleeping, pid: 3339

This is because PackageKit is now locking the yum lock. We can run below command to see that.

# ps -ef| grep package
root      2052     1  0 11:04 ?        00:00:00 /usr/libexec/packagekitd
root      4134  3296  0 11:37 pts/1    00:00:00 grep --color=auto package

1. Fix Another App Is Currently Holding The Yum Lock Waiting For It To Exit Steps.

  1. Run command kill -9 2052 to kill application PackageKit.
    # kill -9 2052
    
    # ps -ef| grep 2052
    root      4216  3296  0 11:40 pts/1    00:00:00 grep --color=auto 2052
  2. If above method do not take effect, run command # pkill PackageKit
    # pkill PackageKit
  3. Now you can run the yum command again to install tigervnc server without error.

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.