運行yum install php -y 出現無法安裝的問題

問題:運行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

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章