报错
[root@dosbat ~]# yum install zabbix-agent
已加载插件:fastestmirror
/var/run/yum.pid 已被锁定,PID 为 1304 的另一个程序正在运行。
Another app is currently holding the yum lock; waiting for it to exit...
另一个应用程序是:yum
内存:141 M RSS (1.2 GB VSZ)
已启动: Tue Aug 9 15:40:25 2022 - 05:47之前
状态 :睡眠中,进程ID:1304
Another app is currently holding the yum lock; waiting for it to exit...
另一个应用程序是:yum
内存:141 M RSS (1.2 GB VSZ)
已启动: Tue Aug 9 15:40:25 2022 - 05:49之前
状态 :睡眠中,进程ID:1304
Another app is currently holding the yum lock; waiting for it to exit...
另一个应用程序是:yum
内存:141 M RSS (1.2 GB VSZ)
已启动: Tue Aug 9 15:40:25 2022 - 05:51之前
状态 :睡眠中,进程ID:1304
Another app is currently holding the yum lock; waiting for it to exit...
另一个应用程序是:yum
内存:141 M RSS (1.2 GB VSZ)
已启动: Tue Aug 9 15:40:25 2022 - 05:53之前
状态 :睡眠中,进程ID:1304
yum在update时卡住了,直接强制退出了,再次安装时,提示yum被锁,遇到这种情况,可以查看执行中进程,然后直接删除进程。
解决方法
[root@dosbat ~]# ps aux|grep yum
[root@dosbat ~]# kill -9 1304 #1304代表yum的进程ID