• 首页
  • 归档
  • 关于
  • 搜索
  • 夜间模式
    ©2026  望时代 Theme by OneBlog

    望时代

    搜索
    标签
    # 教程 # Linux # 脚本 # AI # 影音 # 游戏 # 随笔 # 科技 # 认知
  • 首页>
  • >
  • 正文
  • centos7系统yum命令提示占用,无法执行的解决方法

    2026年06月26日 3 阅读 0 评论 2388 字

    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 ] 享有,未经作者书面授权,禁止转载,封面图片来源于 [ 互联网 ] ,本文仅供个人学习、研究和欣赏使用。如有异议,请联系博主及时处理。
    取消回复

    发表留言
    回复

    Copyright©2026  All Rights Reserved.  Load:0.003 s
    Theme by OneBlog V3.7.1
    夜间模式

    开源不易,请尊重作者版权,保留基本的版权信息。