centos7系统yum命令提示占用,无法执行的解决方法 __2023年1月23日 __0条评论 __1.1k次阅读 __0人点赞 __Tao_Qi 
[code] [root@b4DUMzFSVA ~]# yum install -y wget && wget -O install.sh http://download.bt.cn/install/install_6.0.sh && sh install.sh
Loaded plugins: fastestmirror
Existing lock /var/run/yum.pid: another copy is running as pid 4028.
Another app is currently holding the yum lock; waiting for it to exit...
The other application is: yum
Memory : 23 M RSS (418 MB VSZ)
Started: Tue Feb 1 15:43:21 2022 - 00:25 ago
State : Sleeping, pid: 4028
Another app is currently holding the yum lock; waiting for it to exit...
The other application is: yum
Memory : 29 M RSS (424 MB VSZ)
Started: Tue Feb 1 15:43:21 2022 - 00:27 ago
State : Running, pid: 4028
Another app is currently holding the yum lock; waiting for it to exit...
The other application is: yum
Memory : 29 M RSS (424 MB VSZ)
Started: Tue Feb 1 15:43:21 2022 - 00:29 ago
State : Running, pid: 4028
Another app is currently holding the yum lock; waiting for it to exit...
The other application is: yum
Memory : 27 M RSS (422 MB VSZ)
Started: Tue Feb 1 07:43:22 2022 - 00:31 ago
State : Running, pid: 4028
[/code]
原因是yum被某个程序占用,粗暴的解决方法是执行以下命令,强制结束占用yum的进程:
[code] rm -f /var/run/yum.pid
[/code]
执行以上命令后,yum就不会报错了。 另外,以下是永久关闭该错误的方法:
[code] [root@oracle pluginconf.d]# cd /etc/yum/pluginconf.d/
[root@oracle pluginconf.d]# ls
product-id.conf refresh-packagekit.conf rhnplugin.conf security.conf subscription-manager.conf
[root@oracle pluginconf.d]# vim refresh-packagekit.conf
[main]
enabled=0 --将原来的1改成0即可[/code]
本作品采用 知识共享署名-相同方式共享 4.0 国际许可协议电子邮件地址不会被公开。必填项已用 标注 __ __
本文著作权归作者 [ doudoudoubao ] 享有,未经作者书面授权,禁止转载,封面图片来源于 [ 互联网 ] ,本文仅供个人学习、研究和欣赏使用。如有异议,请联系博主及时处理。