linux中yum update被占用(Another app is currently holding the yum lock)的解决办法

发布时间:2022-05-03 发布网站:脚本宝典
脚本宝典收集整理的这篇文章主要介绍了linux中yum update被占用(Another app is currently holding the yum lock)的解决办法脚本宝典觉得挺不错的,现在分享给大家,也给大家做个参考。

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


复制代码
代码如下:

# yum -y install vixie-cron
Loaded plugins: fastestmirror, refresh-packagekIT, security
Existing lock /VAR/run/yum.pid: another copy is running as pid <font color="#ff0000">25960</font>.
Another app is currently holding the yum lock; waiting for it to exit...


可能是系统自动升级正在运行,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>


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

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

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

然后就可以使用yum了。如果不行可以重启yum

/sbin/service yum-updatesd restart

以下是其它网友的补充:

补充一、

有时,在linux下yum update会提示:

Another app is currently holding the yum lock解决方案

解决办法是干掉缓存中的yum进程,重启yum。

清掉缓存中的进程:

rm -f /var/run/yum.pid

重启yum(我的系统是Fedora

Systemctl status yum-updatesd.service

centos用户使用:

/sbin/service yum-updatesd restart

补充二、

在CentOS上yum -y install gcc* gcc-c++* autoconf* automake* zlib* libXMl* ncurses-devel* libmcrypt* liBTool*时出现错误:

\&nbsp;

1)怎么回事呢?根据提示,原来是系统进程已经有一个update在运行了。在进程里查看下:ps -ef | grep update

\

2)通过kill杀掉这个进程,可杀掉之后,错误依旧。原来在/var/run目录下,还有yum这个进程ID,需要将这个进程id文件强制删除掉:

\ 

3)同时重启下yum更新服务,如下:

\

4)最后重新yum -y install gcc* gcc-c++* autoconf* automake* zlib* libxML* ncurses-devel* libmcrypt* libtool* ,已正常

\

以上就是脚本宝典小编的整理了,希望大家多支持脚本宝典网站。

脚本宝典总结

以上是脚本宝典为你收集整理的linux中yum update被占用(Another app is currently holding the yum lock)的解决办法全部内容,希望文章能够帮你解决linux中yum update被占用(Another app is currently holding the yum lock)的解决办法所遇到的问题。

如果觉得脚本宝典网站内容还不错,欢迎将脚本宝典推荐好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。
标签:updateyum