电脑疯子技术论坛|电脑极客社区

微信扫一扫 分享朋友圈

已有 2829 人浏览分享

在yum install 时出现的“State : Sleeping, pid: xxxx”问题的解决方式

[复制链接]
2829 0

当我在安装python包时,往往会依赖以下几个包,但是有些电脑会出现以下错误:

[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


遇到这个错误我们可以用以下命令解决:

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


至此,你安装这些依赖不会报这个错误,这个错误的原因是因为:
/var/run/yum.pid 已被锁定,PID 为 4776 的另一个程序正在运行。
另外一个程序锁定了 yum。删除yum.pid即可。

您需要登录后才可以回帖 登录 | 注册

本版积分规则

1

关注

0

粉丝

9021

主题
精彩推荐
热门资讯
网友晒图
图文推荐

Powered by Pcgho! X3.4

© 2008-2022 Pcgho Inc.