一、问题如下:
- 在CentOS 7下使用yum时出现系统处于锁定状态的解决方法。
[root@localhost opt]# yum install libaio.so.1
已加载插件:fastestmirror, langpacks
/var/run/yum.pid 已被锁定,PID 为 9418 的另一个程序正在运行。
Another app is currently holding the yum lock; waiting for it to exit...
另一个应用程序是:PackageKit
内存:174 M RSS (517 MB VSZ)
已启动: Thu Jan 28 22:17:32 2021 - 07:18之前
状态 :睡眠中,进程ID:9418
Another app is currently holding the yum lock; waiting for it to exit...
- 这是因为yum处于锁定状态中
-
可以通过强制关掉yum进程来解决这个问题,直接在终端运行 rm -f /var/run/yum.pid 将该文件删除,然后再次运行yum即可。
[root@localhost opt]# sudo rm -f /var/run/yum.pid
-
如下图,就不会再出现 /var/run/yum.pid 已被锁定 的问题了。