Another app is currently holding the yum lock

After resolving a problem with network connectivity on a CentOS 7 Linux server, I attempted to install a package using yum, but received the message "Another app is currently holding the yum lock; waiting for it to exit..."

# yum install rdesktop
Loaded plugins: fastestmirror, langpacks
Existing lock /var/run/yum.pid: another copy is running as pid 16020.
Another app is currently holding the yum lock; waiting for it to exit...
  The other application is: PackageKit
    Memory :  46 M RSS (1.4 GB VSZ)
    Started: Fri Jul 29 12:08:28 2016 - 01:14 ago
    State  : Running, pid: 16020
Another app is currently holding the yum lock; waiting for it to exit...
  The other application is: PackageKit
    Memory :  46 M RSS (1.4 GB VSZ)
    Started: Fri Jul 29 12:08:28 2016 - 01:16 ago
    State  : Sleeping, pid: 16020
Another app is currently holding the yum lock; waiting for it to exit...
  The other application is: PackageKit
    Memory :  46 M RSS (1.4 GB VSZ)
    Started: Fri Jul 29 12:08:28 2016 - 01:18 ago
    State  : Sleeping, pid: 16020
Another app is currently holding the yum lock; waiting for it to exit...
  The other application is: PackageKit
    Memory :  46 M RSS (1.4 GB VSZ)
    Started: Fri Jul 29 12:08:28 2016 - 01:20 ago
    State  : Sleeping, pid: 16020
Another app is currently holding the yum lock; waiting for it to exit...
  The other application is: PackageKit
    Memory :  46 M RSS (1.4 GB VSZ)
    Started: Fri Jul 29 12:08:28 2016 - 01:22 ago
    State  : Sleeping, pid: 16020
Another app is currently holding the yum lock; waiting for it to exit...
  The other application is: PackageKit
    Memory :  46 M RSS (1.4 GB VSZ)
    Started: Fri Jul 29 12:08:28 2016 - 01:24 ago
    State  : Sleeping, pid: 16020
^C

Exiting on user cancel.
#

I checked the process and saw the following information:

# ps aux | grep yum
root     16020 28.4  2.3 1455028 79512 ?       SN   12:08   1:16 /usr/bin/python /usr/share/PackageKit/helpers/yum/yumBackend.py refresh-cache yes
root     16354  0.0  0.0 112652   952 pts/0    S+   12:12   0:00 grep --color=auto yum
#

When I checked on whether there was a PackageKit package installed on the system, I saw the following information

# rpm -qi PackageKit
Name        : PackageKit
Version     : 1.0.7
Release     : 5.el7.centos
Architecture: x86_64
Install Date: Fri 15 Jul 2016 03:20:47 PM EDT
Group       : Unspecified
Size        : 2706472
License     : GPLv2+ and LGPLv2+
Signature   : RSA/SHA256, Wed 25 Nov 2015 10:24:57 AM EST, Key ID 24c6a8a7f4a80eb5
Source RPM  : PackageKit-1.0.7-5.el7.centos.src.rpm
Build Date  : Sun 22 Nov 2015 12:17:59 PM EST
Build Host  : worker1.bsys.centos.org
Relocations : (not relocatable)
Packager    : CentOS BuildSystem <http://bugs.centos.org>
Vendor      : CentOS
URL         : http://www.freedesktop.org/software/PackageKit/
Summary     : Package management service
Description :
PackageKit is a D-Bus abstraction layer that allows the session user
to manage packages in a secure way using a cross-distro,
cross-architecture API.

The Wikipedia article on PackageKit notes:

PackageKit is a free and open-source suite of software applications designed to provide a consistent and high-level front end for a number of different package management systems.

I assumed the software hadn't run for awhile due to a recent power outage; network connectivity wasn't restored when the system rebooted and I just restored the network connectivity a moment before running the yum command. So I thought I could just wait a few minutes for it to complete its package update check and try again. And a few minutes later a Software updates available" message appeared at the bottom of the screen. When I checked on whether there were any yum-related proceses running after I saw that message, I found there were none.

# ps aux | grep yum | grep -v grep
#

And I was able to successfully run the yum install command that had previously produced the "Another app is currently holding the yum lock" message.

 

TechRabbit ad 300x250 newegg.com

Justdeals Daily Electronics Deals1x1 px