Error set: /var/run/yum.pid is locked when yum is installed, and another program with PID 2828 is running.

Error: /var/run/yum.pid was locked when yum was installed in the ELK experiment and another program with PID 2828 was running.

1. Error reporting phenomenon:

[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.

Insert picture description here

2. Solution:

The reason is: the yum command can only download one software at a time, so when you need to download the second software package, the system will lock yum with the process lock; sometimes when you use yum to upgrade some files, this is the case.
After deleting its process file, run yum again to be available.

rm -rf /var/run/yum.pid

Insert picture description here

Guess you like

Origin blog.csdn.net/qq_35456705/article/details/114838839