[root@bogon ~]# yum install gcc-c++
Loaded plugins: fastestmirror, refresh-packagekit, security
Existing lock /var/run/yum.pid: another copy is running as pid 2395.
Another app is currently holding the yum lock; waiting for it to exit...
The other application is: PackageKit
Memory : 20 M RSS ( 35 MB VSZ)
Started: Thu Jul 20 11:25:58 2017 - 8:01:01 ago
State : Sleeping, pid: 2395
这里的意思是yum被占用所以需要把这个进程干掉!!!
解决办法:
第一种办法:
kill -s 9 2395
第二种办法:
要是第一种没效果就用下面语句:
rm -f /var/run/yum.pid
然后使用ps命令
ps aux|grep yum
查看占用yum的进程是否被干掉
然后安心的使用yum命令吧。。。我这里安装的是gcc
yum install gcc-c++