IT码农库

您当前所在位置:首页 > 操作系统 > RedHat/Centos

RedHat/Centos

CentOS yum强行解除锁定的方法

互联网 佚名2014-03-07RedHat/Centos814
遇到开机以后使用yum命令不成功,执行yum命令时提示“Another app is currently holding the yum lock; waiting for it to exit...”错误提示

一、错误提示:

复制代码
代码如下:

[root@localhost]# yum list</p> <p>Existing lock /var/run/yum.pid: another copy is running as pid 3807.</p> <p>Another app is currently holding the yum lock; waiting for it to exit…

二、原因:
字面意思是说"另外一个程序给yum加了锁,要等到 yum-updatesd 程序退出以后才可以进行", yum-updatesd是系统自带的一个提供系统更新的服务,安装文件也叫做yum-updatesd,这个服务默认是自动启动的(init 5),他运行的时候会自动给yum加锁,这就导致了开机后不能手动进行yum了。

三、解决方法:
在bash里面直接输入以下命令,删除yum.pid强行解除锁定就可以了。

复制代码
代码如下:
rm -rf /var/run/yum.pid

大图广告(830*140)