運行yum系統提示Existing lock /var/run/yum.pid: another copy is running as pid

Existing lock /var/run/yum.pid: another copy is running as pid 6166.
Another app is currently holding the yum lock; waiting for it to exit...
The other application is: yum-updatesd-he
Memory : 21 M RSS (248 MB VSZ)
Started: Fri Jul 13 08:35:16 2012 - 1 day(s) 9:56:33 ago
State : Sleeping, pid: 6166
2 already installed and latest version
Loaded plugins: fastestmirror
Existing lock /var/run/yum.pid: another copy is running as pid 6166.
Another app is currently holding the yum lock; waiting for it to exit...
The other application is: yum-updatesd-he
Memory : 21 M RSS (248 MB VSZ)
Started: Fri Jul 13 08:35:16 2012 - 1 day(s) 9:56:34 ago
State : Sleeping, pid: 6166
Another app is currently holding the yum lock; waiting for it to exit...
The other application is: yum-updatesd-he
Memory : 21 M RSS (248 MB VSZ)
Started: Fri Jul 13 08:35:16 2012 - 1 day(s) 9:56:36 ago
State : Sleeping, pid: 6166

今天用yum总是报上面的错,查找网上的方法是这样的

#####################################################################33

停止yum进程

[root@localhost ~]# rm -f /var/run/yum.pid

为什么会有一个yum进程在执行呢?

原来是yum自动更新机制自动激活了yum进程,用下面的命令停止自动更新:

[root@localhost ~]# /etc/init.d/yum-updatesd stop

停止 yum-updatesd: [确定]

如果我们不需要自动更新服务,可以直接删除它。
#yum remove yum-updatesd
不过删除该服务之后,以后的更新要用下面的命令手工来完成了。

#yum update

原文:http://www.lutuzhi.com/howto/112.html

http://www.lutuzhi.com/howto/112.html

CentOS 5有一个新的守护进程叫做yum-updatesd,它替代了老的cron中yum的更新脚本.这个(新)脚本会频繁的检查更新,并根据配置下载或安装它们。然而,这个守护进程对server来说并不好,因为它并不是在固定的时间运行,它有可能在服务器一天当中最忙的时候下载和更新软件。所以,需要禁止这个服务

#查看运行情况
[root@ e ~]# service yum-updatesd status
yum-updatesd (pid 5814) is running…

#关闭服务
[root@ e ~]# service yum-updatesd stop
Stopping yum-updatesd: [ OK ]

#禁止服务随机启动
[root@ e ~]# chkconfig –level 35 yum-updatesd off

################################################

按照他的思路/etc/init.d/yum-updatesd stop 停掉这个,

再杀死下面的进程就可以了
ps aux|grep yum
root 6166 0.0 0.2 254220 21156 ? SN Jul13 0:00 /usr/bin/python -tt /usr/libexec/yum-updatesd-helper --check --dbus
root 10572 0.0 0.0 61180 724 pts/0 S+ 18:32 0:00 grep yum
[root@xjfanren lcj]# kill 6166

Database error: [Table 'ac_search_cache' is marked as crashed and should be repaired]

SELECT * FROM ac_search_cache WHERE hash = 'c129870578ac4240ff3e5c0d988ae8b7e8f9ff4f' LIMIT 1;