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

 找回密码
 注册

QQ登录

只需一步,快速开始

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

[复制链接]
zhaorong 发表于 2018-6-20 14:46:18 | 显示全部楼层 |阅读模式

当我在安装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即可。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

手机版|小黑屋|VIP|电脑疯子技术论坛 ( Computer madman team )

GMT+8, 2025-3-14 04:21

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

快速回复 返回顶部 返回列表