Linux运维•运维日志-解决Another app is currently holding the yum lock; waiting for it to exit...

[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命令吧。。。我这里安装的是很多依赖

yum -y install wget openssl* gcc gcc-c++ autoconf libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libxml2 libxml2-devel zlib zlib-devel glibc glibc-devel glib2 glib2-devel bzip2 bzip2-devel ncurses ncurses-devel curl curl-devel e2fsprogs e2fsprogs-devel krb5 krb5-devel libidn libidn-devel openssl openssl-devel openldap openldap-devel nss_ldap openldap-clients openldap-servers make gd gd2 gd-devel gd2-devel libxslt libxslt-devel libaio libaio-devel

猜你喜欢

转载自blog.csdn.net/weixin_37973929/article/details/85246422
今日推荐