今天在Fedora上用yum突然碰到,yum lock的问题,
yum list perl
Loaded plugins: fastestmirror, refresh-packagekit
Existing lock /var/run/yum.pid: another copy is running as pid 21547.
Another app is currently holding the yum lock; waiting for it to exit...
The other application is: PackageKit
Memory : 2xx M RSS ( 5xx MB VSZ)
Started: XXXXX xxxxx #此处略去时间
State : sleeping, pid: 21547
先看看是谁在用,
ps aux | grep yum
出来个 /usr/bin/python /usr/share/PackageKit/helpers/yum/yumBackend.py get_updates yes 的玩意儿,
懒得理他,直接kill
kill -9 21547
再来list一下,
yum list perl
貌似还是挂了不能用,
再来
ps aux | grep yum
几乎是乱码,反正还是不能用
也罢,那就来点狠得,
rm -rf /var/run/yum.pid
然后再list一下,结果正常,好像不用像别的地方说的敲:
/sbin/service yum-updatedsd restart 去重启service了