/var/run/yum.pid 已被锁定,PID 为 XXXXX 的另一个程序正在运行

删除jdk时终端提示

/var/run/yum.pid已被锁定,PID 为 XXXXX 的另一个程序正在运行

解决方法

直接在终端运行 rm -f/var/run/yum.pid 将该文件删除,然后再次运行yum





问题再现:





[root@localhostzjy]# yum -y remove java-1.8.0-openjdk-headless-1.8.0.65-3.b17.el7.x86_64

已加载插件langpacks,product-id,search-disabled-repos,subscription-manager

This system is notregistered to Red Hat Subscription Management. You can use subscription-managerto register.

/var/run/yum.pid 已被锁定,PID 36637 的另一个程序正在运行。

Another app iscurrently holding the yum lock; waiting for it to exit...

一个应用程序是:yum

内存: 80 M RSS 441 MB VSZ

已启动: Sun Jan 7 19:29:40 2018 -02:55之前

状态 :跟踪/停止,进程ID36637

Another app iscurrently holding the yum lock; waiting for it to exit...

一个应用程序是:yum

内存: 80 M RSS 441 MB VSZ

已启动: Sun Jan 7 19:29:40 2018 -02:57之前

状态 :跟踪/停止,进程ID36637

Another app iscurrently holding the yum lock; waiting for it to exit...

一个应用程序是:yum

内存: 80 M RSS 441 MB VSZ

已启动: Sun Jan 7 19:29:40 2018 -02:59之前

状态 :跟踪/停止,进程ID36637

Another app iscurrently holding the yum lock; waiting for it to exit...

一个应用程序是:yum

内存: 80 M RSS 441 MB VSZ

已启动: Sun Jan 7 19:29:40 2018 -03:01之前

状态 :跟踪/停止,进程ID36637

Another app iscurrently holding the yum lock; waiting for it to exit...

一个应用程序是:yum

内存: 80 M RSS 441 MB VSZ

已启动: Sun Jan 7 19:29:40 2018 -03:03之前

状态 :跟踪/停止,进程ID36637

^Z

解决后:





成功!

相关文章

用的openwrt路由器,家里宽带申请了动态公网ip,为了方便把2...
#!/bin/bashcommand1&command2&wait从Shell脚本并行...
1.先查出MAMP下面集成的PHP版本cd/Applications/MAMP/bin/ph...
1、先输入locale-a,查看一下现在已安装的语言2、若不存在如...
BashPerlTclsyntaxdiff1.进制数表示Languagebinaryoctalhexa...
正常安装了k8s后,使用kubect工具后接的命令不能直接tab补全...