Linux ❀ yum服务进程占用导致无法正常使用的解决方法
Posted 国家级干饭型选手°
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Linux ❀ yum服务进程占用导致无法正常使用的解决方法相关的知识,希望对你有一定的参考价值。
1、问题描述
在使用yum源进行更新、缓存、安装某个服务过程中,会出现如下报错,此时是由于进程占用导致yum无法正常运行,需要关闭进程来解决该问题;
[root@localhost ~]# yum clean all
Loaded plugins: fastestmirror, langpacks
Repodata is over 2 weeks old. Install yum-cron? Or run: yum makecache fast
Existing lock /var/run/yum.pid: another copy is running as pid 3520.
Another app is currently holding the yum lock; waiting for it to exit...
The other application is: PackageKit
Memory : 194 M RSS (1.5 GB VSZ)
Started: Fri Jun 25 15:07:55 2021 - 02:25 ago
State : Sleeping, pid: 3520
Another app is currently holding the yum lock; waiting for it to exit...
The other application is: PackageKit
Memory : 194 M RSS (1.5 GB VSZ)
Started: Fri Jun 25 15:07:55 2021 - 02:27 ago
State : Sleeping, pid: 3520
2、解决方法
- 需要终止其运行的yum进程(进程号码为报错中的pid号码)
[root@localhost yum.repos.d]# kill -9 3520
- 关闭进程后可以通过下面命令来确认进程是否还存在
[root@localhost yum.repos.d]# ps -ef | grep yum | grep 3520
root 3979 3424 0 15:22 pts/0 00:00:00 grep --color=auto yum
- 关闭后即可恢复yum源的使用;
[root@localhost yum.repos.d]# yum clean all
BDB2053 Freeing read locks for locker 0x10f6: 3520/140399564494656
BDB2053 Freeing read locks for locker 0x10f8: 3520/140399564494656
Loaded plugins: fastestmirror, langpacks
Repodata is over 2 weeks old. Install yum-cron? Or run: yum makecache fast
Cleaning repos: base extras updates
Cleaning up everything
Cleaning up list of fastest mirrors
以上是关于Linux ❀ yum服务进程占用导致无法正常使用的解决方法的主要内容,如果未能解决你的问题,请参考以下文章