[root@localhost ~]# yum makecache
Loaded plugins: fastestmirror, refresh-packagekit, security
Existing lock /var/run/yum.pid: another copy is running as pid 2542.
Another app is currently holding the yum lock; waiting for it to exit...
在更換yum源的過程中出現這個報錯,可能是系統自動升級正在運行,yum在鎖定狀態。
[root@localhost ~]# ps -aux | grep yum
Warning: bad syntax, perhaps a bogus '-'? See /usr/share/doc/procps-3.2.8/FAQ
root 2542 0.0 0.0 0 0 ? Z 22:18 0:01 [yumBackend.py] <defunct>
root 23606 0.0 0.0 103244 836 pts/1 S+ 23:55 0:00 grep yum
在這時使用kill並不能生效
這是可以強制關閉yum裏的進程
[root@localhost ~]# rm -f /var/run/yum.pid
這時繼續執行就可以了。