yum装包时提示Another app is currently holding the yum lock; waiting for it to exit...

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了yum装包时提示Another app is currently holding the yum lock; waiting for it to exit...相关的知识,希望对你有一定的参考价值。


1、首先先用yum装一个包,但不加-y选项当屏幕提示 Is this ok [y/d/N]:是按Ctrl+z强制退出

.....

xorg-x11-xkb-utils              x86_64 7.7-14.el7             BaseOS 103 k

yajl                            x86_64 2.0.4-4.el7            BaseOS  39 k

yelp-libs                       x86_64 2:3.28.1-1.el7         BaseOS 101 k

yelp-xsl                        noarch 3.28.0-1.el7           BaseOS 204 k

zenity                          x86_64 3.28.1-1.el7           BaseOS 4.0 M


事务概要

============================================================================

安装  294 软件包 (+740 依赖软件包)


总下载量:846 M

安装大小:2.7 G

Is this ok [y/d/N]: ^C^Z

[1]+  已停止            

2、之后我们再来进行安装,此时就会提示Another app is currently holding the yum lock; waiting for it to exit...

[root@server opt]# yum install -y gcc

已加载插件:fastestmirror

源 myrpm 在配置文件中未指定名字,使用标识代替

/var/run/yum.pid 已被锁定,PID 为 969 的另一个程序正在运行。

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

 另一个应用程序是:yum

   内存:128 M RSS (450 MB VSZ)

   已启动: Wed Mar  8 09:09:42 2023 - 08:55之前

   状态  :跟踪/停止,进程ID:969

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

 另一个应用程序是:yum

   内存:128 M RSS (450 MB VSZ)

   已启动: Wed Mar  8 09:09:42 2023 - 08:57之前

   状态  :跟踪/停止,进程ID:969

^C


Exiting on user cancel.

3、此时按提示用kill杀掉进程,可还是不行,再装还会出现同样的提示

[root@server opt]# kill 969

[root@server opt]# yum install -y gcc

已加载插件:fastestmirror

源 myrpm 在配置文件中未指定名字,使用标识代替

/var/run/yum.pid 已被锁定,PID 为 969 的另一个程序正在运行。

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

 另一个应用程序是:yum

   内存:128 M RSS (450 MB VSZ)

   已启动: Wed Mar  8 09:09:42 2023 - 13:15之前

   状态  :跟踪/停止,进程ID:969

4、此时我们再仔细看看报错信息里有“/var/run/yum.pid 已被锁定“这么一句,其实只需要删除即可

(之后就可以安装了)

[root@server opt]# rm -f /var/run/yum.pid 

[root@server opt]# yum install -y gcc

已加载插件:fastestmirror

源 myrpm 在配置文件中未指定名字,使用标识代替

Loading mirror speeds from cached hostfile

软件包 gcc-4.8.5-44.el7.x86_64 已安装并且是最新版本

无须任何处理

以上是关于yum装包时提示Another app is currently holding the yum lock; waiting for it to exit...的主要内容,如果未能解决你的问题,请参考以下文章

yum提示Another app is currently holding the yum lock

yum提示Another app is currently holding the yum lock

yum提示another app is currently holding the yum lock;waiting for it to exit

[yum]Another app is currently holding the yum lock

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

yum安装提示Another app is currently holding the yum lock; waiting for it to exit...