报错:做ELK实验yum安装apache时/var/run/yum.pid 已被锁定,PID 为 2828 的另一个程序正在运行。
1、报错现象:
[root@apache ~]#yum -y install httpd
已加载插件:fastestmirror, langpacks
/var/run/yum.pid 已被锁定,PID 为 2828 的另一个程序正在运行。
Another app is currently holding the yum lock; waiting for it to exit...
另一个应用程序是:PackageKit
内存: 48 M RSS (463 MB VSZ)
已启动: Mon Mar 15 12:59:55 2021 - 3:20:17之前
状态 :睡眠中,进程ID:2828
Another app is currently holding the yum lock; waiting for it to exit...
另一个应用程序是:PackageKit
内存: 48 M RSS (463 MB VSZ)
已启动: Mon Mar 15 12:59:55 2021 - 3:20:19之前
状态 :睡眠中,进程ID:2828
Another app is currently holding the yum lock; waiting for it to exit...
另一个应用程序是:PackageKit
内存: 48 M RSS (463 MB VSZ)
已启动: Mon Mar 15 12:59:55 2021 - 3:20:21之前
状态 :睡眠中,进程ID:2828
^C
Exiting on user cancel.
2、解决方法:
追其原因在:yum命令一次只能下载一个软件,所以当你需要下载第二个软件包的时候,系统会用进程锁锁定yum;有时用yum升级一些文件时,这样的情况。
删除其进程文件后再次运行yum可用。
rm -rf /var/run/yum.pid