yum報錯的修改問題

使用yum安裝軟件,有時候由於系統升級會報錯。
Another app is currently holding the yum lock; waiting for it to exit…
The other application is: PackageKit
Memory : 48 M RSS (370 MB VSZ)
Started: Wed Nov 14 09:29:48 2018 - 40:50 ago
State : Sleeping, pid: 3505
Another app is currently holding the yum lock; waiting for it to exit…
The other application is: PackageKit
Memory : 48 M RSS (370 MB VSZ)
Started: Wed Nov 14 09:29:48 2018 - 40:52 ago
State : Sleeping, pid: 3505

yum -y install gcc*

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…

可能是系統自動升級正在運行,yum在鎖定狀態中。
已經有一個yum進程在運行了,使用kill幹掉它:

kill -s 9 25960

ps aux|grep yum

root 6744 0.0 0.0 103260 900 pts/1 S+ 14:59 0:00 grep yum
root 25960 0.0 0.0 0 0 ? Z Sep19 0:01 [yumBackend.py]

很遺憾,kill對付不了它,那怎麼辦呢?

可以通過強制關掉yum進程:

#rm -f /var/run/yum.pid

然後就可以使用yum了。

[root@renyuzhi ~]# yum clean all
Loaded plugins: product-id, refresh-packagekit, security, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Cleaning repos: InstallMedia
Cleaning up Everything

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