【Bug解决】yum提示Another app is currently holding the yum lock; waiting for it to exit...

问题描述:

今天想在虚拟机上重新安装docker
然后使用到yum命令报错:

Loaded plugins: fastestmirror, langpacks
Repodata is over 2 weeks old. Install yum-cron? Or run: yum makecache fast
Existing lock /var/run/yum.pid: another copy is running as pid 3797.
Another app is currently holding the yum lock; waiting for it to exit...
  The other application is: PackageKit
    Memory : 131 M RSS (1.5 GB VSZ)
    Started: Sun Jan 10 07:07:44 2021 - 01:01 ago
    State  : Sleeping, pid: 3797

解决办法:

输入:

rm -f /var/run/yum.pid

然后重新运行刚才的yum命令即可

原因:

可能是系统自动升级正在运行,yum在锁定状态中,要等待那个进程结束退出:
看报错的那一段话:

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

你可以看一下是否有yum进程

ps aux|grep yum

在这里插入图片描述

如果文章对你有帮助,不要忘了给我点个赞吼( ̄▽ ̄)~
欢迎关注我的微信公众号:松鼠技术站

出现"Another app is currently holding the yum lock; waiting for it to exit..."的错误提示意味着有另一个应用程序正在占用yum锁,导致无法执行yum操作。这个问题通常发生在多个yum命令同时运行或者在后台有其他yum相关进程运行的情况下。解决这个问题有以下几种方法: 1. 等待:通常情况下,等待一段时间就可以解决该问题。因为这个错误提示是在等待其他正在进行的yum操作完成。 2. 杀死占用yum锁的进程:可以使用命令"sudo killall yum"来杀死所有正在运行的yum进程,然后再次尝试运行yum命令。 3. 删除yum锁文件:可以尝试删除yum锁文件,该文件位于/var/run/yum.pid。使用命令"sudo rm /var/run/yum.pid"来删除该文件,然后再次尝试运行yum命令。 4. 检查系统更新:有时候yum锁问题可能是由于系统更新进程正在进行导致的。可以使用命令"sudo yum update"来检查系统更新,然后再次尝试运行yum命令。 需要注意的是,以上方法都需要以管理员权限执行。如果问题仍然存在,可能需要进一步检查系统配置和其他正在运行的进程,以确定引起该问题的原因。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* *3* [【Bug解决yum提示Another app is currently holding the yum lockwaiting for it to exit...](https://blog.csdn.net/weixin_50613762/article/details/126378468)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 50%"] - *2* [问题(八)Another app is currently holding the yum lockwaiting for it to exit...](https://blog.csdn.net/Makasa/article/details/124625932)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 50%"] [ .reference_list ]
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值