一般用yum安装环境或者插件很方便,今天遇到一个错误
# yum -y install gcc-C++
Loaded plugins: fastestmirror, refresh-packagekit, security
Existing lock /var/run/yum.pid: another copy is running as pid 25960.
Another app is currently holding the yum lock; waiting for it to exit...
如果是正在升级等升级完就好了,如果错误日志里面出现了pid说明是正在占用,直接kill掉即可
kill -s 9 pid
ps aux |grep yum
rm -f /var/run/yum.pid