使用yum报错“已加载插件:fastestmirror, langpacks /var/run/yum.pid 已被锁定,PID 为 4757 的另一个程序正在运行。 Another app is c

使用yum安装东西报错
已加载插件:fastestmirror, langpacks
/var/run/yum.pid 已被锁定,PID 为 4757 的另一个程序正在运行。
Another app is currently holding the yum lock; waiting for it to exit…
另一个应用程序是:yum
内存: 24 M RSS (314 MB VSZ)
已启动: Mon Jan 22 21:27:57 2024 - 00:16之前
状态 :睡眠中,进程ID:4757

[root@hadoop3 ~]# yum -y install java-1.8.0-openjdk-dev*
已加载插件:fastestmirror, langpacks
/var/run/yum.pid 已被锁定,PID 为 4757 的另一个程序正在运行。
Another app is currently holding the yum lock; waiting for it to exit...
  另一个应用程序是:yum
    内存: 24 M RSS (314 MB VSZ)
    已启动: Mon Jan 22 21:27:57 2024 - 00:27之前
    状态  :睡眠中,进程ID:4757
Another app is currently holding the yum lock; waiting for it to exit...
  另一个应用程序是:yum
    内存: 24 M RSS (314 MB VSZ)
    已启动: Mon Jan 22 21:27:57 2024 - 00:29之前
    状态  :睡眠中,进程ID:4757
Another app is currently holding the yum lock; waiting for it to exit...
  另一个应用程序是:yum
    内存: 24 M RSS (314 MB VSZ)
    已启动: Mon Jan 22 21:27:57 2024 - 00:31之前
    状态  :睡眠中,进程ID:4757
Another app is currently holding the yum lock; waiting for it to exit...
  另一个应用程序是:yum
    内存: 24 M RSS (314 MB VSZ)
    已启动: Mon Jan 22 21:27:57 2024 - 00:33之前
    状态  :睡眠中,进程ID:4757
Another app is currently holding the yum lock; waiting for it to exit...
  另一个应用程序是:yum
    内存: 24 M RSS (314 MB VSZ)
    已启动: Mon Jan 22 21:27:57 2024 - 00:35之前
    状态  :睡眠中,进程ID:4757

解决办法

查看yum进程

[root@hadoop3 ~]# ps aux| grep yum
root       4757  0.8  0.2 321680 24928 pts/1    S+   21:27   0:00 /usr/bin/python /usr/bin/yum -y install cloudera-manager-agent
root       4797  0.0  0.0 112828   980 pts/0    S+   21:28   0:00 grep --color=auto yum

杀死多余进程

[root@hadoop3 ~]# ps aux| grep yum
root       4757  0.8  0.2 321680 24928 pts/1    S+   21:27   0:00 /usr/bin/python /usr/bin/yum -y install cloudera-manager-agent
root       4797  0.0  0.0 112828   980 pts/0    S+   21:28   0:00 grep --color=auto yum
[root@hadoop3 ~]# kill -9 4757

成功安装

[root@hadoop3 ~]# yum -y install java-1.8.0-openjdk-dev*
已加载插件:fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: mirrors.aliyun.com
 * extras: mirrors.tuna.tsinghua.edu.cn
 * updates: mirrors.tuna.tsinghua.edu.cn
base/7/x86_64/primary_db       FAILED                                           42% [=============================                                        ] 180 kB/s |  13 MB  00:01:39 ETA 
http://mirrors.aliyun.com/centos/7.9.2009/os/x86_64/repodata/6d0c3a488c282fe537794b5946b01e28c7f44db79097bb06826e1c0c88bad5ef-primary.sqlite.bz2: [Errno -1] Metadata file does not match checksum
正在尝试其它镜像。
(1/2): base/7/x86_64/primary_db                                                                                                                                      | 6.1 MB  00:00:25     
updates/7/x86_64/primary_db    FAILED                                           99% [====================================================================-] 232 kB/s |  30 MB  00:00:00 ETA 
http://mirrors.tuna.tsinghua.edu.cn/centos/7.9.2009/updates/x86_64/repodata/fd3848a4a6549cc66935b1a10b01492889874c4d3d9ee6d511f56e636ea15df0-primary.sqlite.bz2: [Errno -1] Metadata file does not match checksum
正在尝试其它镜像。
updates/7/x86_64/primary_db    FAILED                                          
http://mirrors.cqu.edu.cn/CentOS/7.9.2009/updates/x86_64/repodata/fd3848a4a6549cc66935b1a10b01492889874c4d3d9ee6d511f56e636ea15df0-primary.sqlite.bz2: [Errno 14] HTTP Error 503 - Service Unavailable
正在尝试其它镜像。
(2/2): updates/7/x86_64/primary_db                                                                                                                                   |  24 MB  00:02:39     
软件包 1:java-1.8.0-openjdk-devel-1.8.0.392.b08-2.el7_9.x86_64 已安装并且是最新版本
无须任何处理

  • 9
    点赞
  • 11
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值