使用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 已安装并且是最新版本
无须任何处理