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

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

2015年09月24日 15:21:50 阅读数:72261 标签: CentOSyuminstallAnotheryum-lock 更多

个人分类: CentOS

版权声明:本文为 testcs_dn(微wx笑) 原创文章,非商用自由转载-保持署名-注明出处,谢谢。 https://blog.csdn.net/testcs_dn/article/details/48711805

使用yum安装计划任务功能,结果提示:

# yum -y install vixie-cron
Loaded plugins: fastestmirror, refresh-packagekit, security
Existing lock /var/run/yum.pid: another copy is running as pid 25960.
Another app is currently holding the yum lock; waiting for it to exit...
  • 1
  • 2
  • 3
  • 4

可能是系统自动升级正在运行,yum在锁定状态中。 
已经有一个yum进程在运行了,使用kill干掉它:

# kill -s 9 25960
# ps aux|grep yum
root      6744  0.0  0.0 103260   900 pts/1    S+   14:59   0:00 grep yum
root     25960  0.0  0.0      0     0 ?        Z    Sep19   0:01 [yumBackend.py] <defunct>
  • 1
  • 2
  • 3
  • 4

很遗憾,kill对付不了它,那怎么办呢?

可以通过强制关掉yum进程:

#rm -f /var/run/yum.pid
  • 1

然后就可以使用yum了。

 

 

 

    状态  :跟踪/停止,进程ID:3044
Another app is currently holding the yum lock; waiting for it to exit...
  另一个应用程序是:yum
    内存: 52 M RSS (411 MB VSZ)
    已启动: Sat Sep  1 14:42:56 2018 - 5:10:51之前
    状态  :跟踪/停止,进程ID:3044
Another app is currently holding the yum lock; waiting for it to exit...
  另一个应用程序是:yum
    内存: 52 M RSS (411 MB VSZ)
    已启动: Sat Sep  1 14:42:56 2018 - 5:10:53之前
    状态  :跟踪/停止,进程ID:3044
Another app is currently holding the yum lock; waiting for it to exit...
  另一个应用程序是:yum
    内存: 52 M RSS (411 MB VSZ)
    已启动: Sat Sep  1 14:42:56 2018 - 5:10:55之前
    状态  :跟踪/停止,进程ID:3044
Another app is currently holding the yum lock; waiting for it to exit...
  另一个应用程序是:yum
    内存: 52 M RSS (411 MB VSZ)
    已启动: Sat Sep  1 14:42:56 2018 - 5:10:57之前
    状态  :跟踪/停止,进程ID:3044
^C

Exiting on user cancel.
[wangshumin@CentOSNode3 grafana]$ ps aux|grep yum
root      3041  0.0  0.1 250072  6192 pts/0    T    14:42   0:00 sudo yum -y install influxdb-1.2.4.x86_64.rpm
root      3044  0.0  1.3 420880 53616 pts/0    T    14:42   0:07 /usr/bin/python /bin/yum -y install influxdb-1.2.4.x86_64.rpm
root      5882  0.0  0.1 247256  5372 pts/0    T    19:28   0:00 sudo yum install http://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana-5.1.3-1.x86_64.rpm
root      5890  0.0  0.1 250072  6200 pts/0    T    19:28   0:00 sudo yum install http://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana-5.1.3-1.x86_64.rpm
root      5891  0.0  0.7 387384 29428 pts/0    T    19:28   0:00 /usr/bin/python /bin/yum install http://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana-5.1.3-1.x86_64.rpm
root      5949  0.0  0.1 250072  6196 pts/0    T    19:33   0:00 sudo yum install grafana-5.1.3-1.x86_64.rpm
root      5952  0.0  0.7 387384 29408 pts/0    T    19:33   0:00 /usr/bin/python /bin/yum install grafana-5.1.3-1.x86_64.rpm
wangshu+  6296  0.0  0.0 112720   984 pts/0    R+   19:53   0:00 grep --color=auto yum
[wangshumin@CentOSNode3 grafana]$ ps aux|grep yum
root      3041  0.0  0.1 250072  6192 pts/0    T    14:42   0:00 sudo yum -y install influxdb-1.2.4.x86_64.rpm
root      3044  0.0  1.3 420880 53616 pts/0    T    14:42   0:07 /usr/bin/python /bin/yum -y install influxdb-1.2.4.x86_64.rpm
root      5882  0.0  0.1 247256  5372 pts/0    T    19:28   0:00 sudo yum install http://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana-5.1.3-1.x86_64.rpm
root      5890  0.0  0.1 250072  6200 pts/0    T    19:28   0:00 sudo yum install http://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana-5.1.3-1.x86_64.rpm
root      5891  0.0  0.7 387384 29428 pts/0    T    19:28   0:00 /usr/bin/python /bin/yum install http://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana-5.1.3-1.x86_64.rpm
root      5949  0.0  0.1 250072  6196 pts/0    T    19:33   0:00 sudo yum install grafana-5.1.3-1.x86_64.rpm
root      5952  0.0  0.7 387384 29408 pts/0    T    19:33   0:00 /usr/bin/python /bin/yum install grafana-5.1.3-1.x86_64.rpm
wangshu+  6298  0.0  0.0 112720   980 pts/0    S+   19:54   0:00 grep --color=auto yum
[wangshumin@CentOSNode3 grafana]$ kill -9 5890 3044 3041
-bash: kill: (5890) - 不允许的操作
-bash: kill: (3044) - 不允许的操作
-bash: kill: (3041) - 不允许的操作
[wangshumin@CentOSNode3 grafana]$ rm -f /var/run/yum.pid
rm: 无法删除"/var/run/yum.pid": 权限不够
[wangshumin@CentOSNode3 grafana]$ sudo rm -f /var/run/yum.pid
[wangshumin@CentOSNode3 grafana]$ ps aux|grep yum
root      3041  0.0  0.1 250072  6192 pts/0    T    14:42   0:00 sudo yum -y install influxdb-1.2.4.x86_64.rpm
root      3044  0.0  1.3 420880 53616 pts/0    T    14:42   0:07 /usr/bin/python /bin/yum -y install influxdb-1.2.4.x86_64.rpm
root      5882  0.0  0.1 247256  5372 pts/0    T    19:28   0:00 sudo yum install http://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana-5.1.3-1.x86_64.rpm
root      5890  0.0  0.1 250072  6200 pts/0    T    19:28   0:00 sudo yum install http://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana-5.1.3-1.x86_64.rpm
root      5891  0.0  0.7 387384 29428 pts/0    T    19:28   0:00 /usr/bin/python /bin/yum install http://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana-5.1.3-1.x86_64.rpm
root      5949  0.0  0.1 250072  6196 pts/0    T    19:33   0:00 sudo yum install grafana-5.1.3-1.x86_64.rpm
root      5952  0.0  0.7 387384 29408 pts/0    T    19:33   0:00 /usr/bin/python /bin/yum install grafana-5.1.3-1.x86_64.rpm
wangshu+  6319  0.0  0.0 112720   984 pts/0    R+   19:55   0:00 grep --color=auto yum
[wangshumin@CentOSNode3 grafana]$ sudo rm -f /var/run/yum.pid

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值