使用 yum 安装, 结果提示:
yum -y install ansible
Another app is currently holding the yum lock; waiting for it to exit...
The other application is: PackageKit
Memory : 87 M RSS (844 MB VSZ)
Started: Wed May 30 19:20:37 2018 - 07:36 ago
State : Sleeping, pid: 9958
可能是系统自动升级正在运行, yum 在锁定状态中.
已经有一个 yum 进程在运行了, 使用 kill 干掉它:
- kill -s 9 9958
- ps aux|grep yum
- root 9958 0.7 6.5 871192 96192 ? SN 19:20 0:07 /usr/bin/python/usr/share/PackageKit/helpers/yum/yumBackend.py get-updates none
很遗憾, kill 对付不了它, 那怎么办呢?
可以通过强制关掉 yum 进程:
rm -f /var/run/yum.pid
然后就可以使用 yum 了
来源: http://www.bubuko.com/infodetail-2624760.html