Linux运维•运维日志-解决Another app is currently holding the yum lock; waiting for it to exit...

[root@bogon ~]# yum install gcc-c++ 
Loaded plugins: fastestmirror, refresh-packagekit, security
Existing lock /var/run/yum.pid: another copy is running as pid 2395.
Another app is currently holding the yum lock; waiting for it to exit...
  The other application is: PackageKit
    Memory :  20 M RSS ( 35 MB VSZ)
    Started: Thu Jul 20 11:25:58 2017 - 8:01:01 ago
    State  : Sleeping, pid: 2395

这里的意思是yum被占用所以需要把这个进程干掉!!! 
解决办法: 
第一种办法:

kill -s 9 2395

第二种办法: 
要是第一种没效果就用下面语句:

注:执行下面的命令,如果一次没有效果,就执行个七八次,反正不影响。

rm -f /var/run/yum.pid

然后使用ps命令:

ps aux|grep yum

查看占用yum的进程是否被干掉 
然后安心的使用yum命令吧。。。我这里安装的是很多依赖

yum -y install wget openssl* gcc gcc-c++ autoconf libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libxml2 libxml2-devel zlib zlib-devel glibc glibc-devel glib2 glib2-devel bzip2 bzip2-devel ncurses ncurses-devel curl curl-devel e2fsprogs e2fsprogs-devel krb5 krb5-devel libidn libidn-devel openssl openssl-devel openldap openldap-devel nss_ldap openldap-clients openldap-servers make gd gd2 gd-devel gd2-devel libxslt libxslt-devel libaio libaio-devel

 

出现"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 ]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值