Solve the problem of "State: Sleeping, pid: xxxx" in yum install

Keywords: yum Python OpenSSL

When installing python packages, I tend to rely on the following packages, but some computers make the following mistakes:

[root@pachong1 scrapy-cluster-1.2]# yum install gcc libffi-devel python-devel openssl-devel
Loaded plugins: fastestmirror, refresh-packagekit, security
Existing lock /var/run/yum.pid: another copy is running as pid 4776.
Another app is currently holding the yum lock; waiting for it to exit...
  The other application is: PackageKit
    Memory :  52 M RSS (433 MB VSZ)
    Started: Tue Jun 14 11:17:51 2016 - 338 day(s) 4:56:20 ago
    State  : Sleeping, pid: 4776
Another app is currently holding the yum lock; waiting for it to exit...
  The other application is: PackageKit
    Memory :  52 M RSS (433 MB VSZ)
    Started: Tue Jun 14 11:17:51 2016 - 338 day(s) 4:56:22 ago
    State  : Sleeping, pid: 4776
Another app is currently holding the yum lock; waiting for it to exit...
  The other application is: PackageKit
    Memory :  52 M RSS (433 MB VSZ)
    Started: Tue Jun 14 11:17:51 2016 - 338 day(s) 4:56:24 ago
    State  : Sleeping, pid: 4776
Another app is currently holding the yum lock; waiting for it to exit...
  The other application is: PackageKit
    Memory :  52 M RSS (433 MB VSZ)
    Started: Tue Jun 14 11:17:51 2016 - 338 day(s) 4:56:26 ago
    State  : Sleeping, pid: 4776
Another app is currently holding the yum lock; waiting for it to exit...
  The other application is: PackageKit
    Memory :  52 M RSS (433 MB VSZ)
    Started: Tue Jun 14 11:17:51 2016 - 338 day(s) 4:56:28 ago
    State  : Sleeping, pid: 4776
Another app is currently holding the yum lock; waiting for it to exit...
  The other application is: PackageKit
    Memory :  52 M RSS (433 MB VSZ)
    Started: Tue Jun 14 11:17:51 2016 - 338 day(s) 4:56:30 ago
    State  : Sleeping, pid: 4776
Another app is currently holding the yum lock; waiting for it to exit...
  The other application is: PackageKit
    Memory :  52 M RSS (433 MB VSZ)
    Started: Tue Jun 14 11:17:51 2016 - 338 day(s) 4:56:32 ago
    State  : Sleeping, pid: 4776
Another app is currently holding the yum lock; waiting for it to exit...
  The other application is: PackageKit
    Memory :  52 M RSS (433 MB VSZ)
    Started: Tue Jun 14 11:17:51 2016 - 338 day(s) 4:56:34 ago
    State  : Sleeping, pid: 4776
Another app is currently holding the yum lock; waiting for it to exit...
  The other application is: PackageKit
    Memory :  52 M RSS (433 MB VSZ)
    Started: Tue Jun 14 11:17:51 2016 - 338 day(s) 4:56:36 ago
    State  : Sleeping, pid: 4776
Another app is currently holding the yum lock; waiting for it to exit...
  The other application is: PackageKit
    Memory :  52 M RSS (433 MB VSZ)
    Started: Tue Jun 14 11:17:51 2016 - 338 day(s) 4:56:38 ago
    State  : Sleeping, pid: 4776

In case of this mistake, we can use the following command to solve it:

[root@pachong1 scrapy-cluster-1.2]# rm -f /var/run/yum.pid 4776

At this point, you will not report this error by installing these dependencies because:
/ var/run/yum.pid is locked and another program with a PID of 4776 is running. Another program locks yum. Delete yum. pid.

Posted by immobilarity on Tue, 05 Feb 2019 20:18:17 -0800