yum提示another app is currently holding the yum lock;...

有时候在使用yum进行安装任务功能时,结果提示

# yum -y install vim
Loaded plugins: fastestmirror
Existing lock /var/run/pid:another copy is running as pid 1718
Another app is currently holding the yum lock; waiting for it to exit...
  ...

此时可能有其他应用正在使用,比如系统升级、刚才进行安装任务时进行了挂起。从而使yum在锁定状态中。

此时可以使用ps命令查看使用yum的进程:ps aux|grep yum

# kill -s 9 1718
# ps aux|grep yum
root      1718  0.0  1.3 353756 24908    T    04:54   0:00 /usr/bin/python /bin/yum -y install vim
root      1720  0.0  1.3 353756 24716    T    04:54   0:00 /usr/bin/python /bin/yum -y install vim
root      1739  0.0  0.0 112812   968    R+   05:01   0:00 grep --color=auto yum

此时发现使用kill命令无法杀掉该进程,则此时可以将进行强制关闭yum进程来解除占用

# rm -f /var/rum/yum.pid

通过强制关闭之后,就可以使用yum了

永久禁止该错误的方法:

永久禁止该错误

```
[root@oracle pluginconf.d]# cd /etc/yum/pluginconf.d/
[root@oracle pluginconf.d]# ls
product-id.conf  refresh-packagekit.conf  rhnplugin.conf  security.conf  subscription-manager.conf
[root@oracle pluginconf.d]# vim refresh-packagekit.conf
[main]
enabled=0  --将原来的1改成0即可

参考文献:http://blog.itpub.net/29812844/viewspace-1988770/

                  https://blog.csdn.net/testcs_dn/article/details/48711805

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值