运行yum install php -y 出现无法安装的问题
更新:HHH   时间:2023-1-7


问题:运行yun install php -y 出现Existing lock /var/run/yum.pid: another copy is running as pid 12092.问题。

[root@xiao ~]# yum install php -y
Loaded plugins: fastestmirror, refresh-packagekit, security
Existing lock /var/run/yum.pid: another copy is running as pid 12092.
Another app is currently holding the yum lock; waiting for it to exit...
  The other application is: yum
    Memory :  14 M RSS ( 31 MB VSZ)
    Started: Mon Nov 24 02:55:21 2014 - 00:23 ago
    State  : Sleeping, pid: 12092

原因:安装的时候yum有一个自动更新的服务(/etc/init.d/yum-updatesd)在运行,激活了yum进程。

方法:停止进程,关闭服务

停止进程:[root@xiao ~]#rm -f /var/run/yum.pid

关闭服务:[root@xiao ~]#/etc/init.d/yum-updatesd stop

返回web开发教程...