解决方案

查看进程 ID 和使用 yum 命令的用户

# ps aux | grep yum
root      3054  0.5  4.9 351016 49860 pts/1    S+   03:32   0:00 /usr/bin/python /usr/bin/yum install bind bind-chroot
root      3083  5.4  2.5 341876 25596 ?        S    03:34   0:01 /usr/bin/python /usr/share/PackageKit/helpers/yum/yumBackend.py refresh-cache yes
root      3087  0.0  0.0 103244   860 pts/2    S+   03:35   0:00 grep yum

jack 用户使用 3054 PID。
我们可以通知用户 jack 并检查他的应用程序将锁定 yum 的时间

或者直接杀死PID

# kill -9 3054

重新尝试运行yum命令

Existing lock /var/run/yum.pid: another copy is running

原因

正如您从错误中看到的,它说 yum 命令被另一个应用程序锁定。 yum 命令一次只能在一台机器上运行一个。 如果您尝试在多个终端上运行它,那么除非使用 yum 的应用程序释放锁定,否则您将收到上述弹出错误。

问题

在Red Hat Linux上运行yum 命令时 报错:

# yum install bind
 Loaded plugins: fastestmirror, refresh-packagekit, security
 Existing lock /var/run/yum.pid: another copy is running as pid 3054.
 Another app is currently holding the yum lock; waiting for it to exit...
   The other application is: yum
     Memory :  49 M RSS (343 MB VSZ)
     Started: Fri Mar 14 03:32:19 2014 - 00:10 ago
     State  : Sleeping, pid: 3054 
日期:2020-06-02 22:16:52 来源:oir作者:oir