一、解决方法一
yum安装软件时,出现下面错误
[nangy@nangy-vm ~]$ sudo yum install netease-cloud-music
已加载插件:fastestmirror, langpacks
/var/run/yum.pid 已被锁定,PID 为 13189 的另一个程序正在运行。
Another app is currently holding the yum lock; waiting for it to exit...
另一个应用程序是:PackageKit
内存: 28 M RSS (444 MB VSZ)
已启动: Tue Aug 20 15:43:54 2019 - 00:18之前
状态 :睡眠中,进程ID:13189
PackageKit
是一个离线更新服务,基本没啥用途,应该永久禁用。
修改/etc/yum/pluginconf.d/langpacks.conf
,将enabled=1
改为enabled=0
[nangy@nangy-vm ~]$ sudo vim /etc/yum/pluginconf.d/langpacks.conf
[main]
# enabled=1
enabled=0
# What langpacks to install is all of:
# - any previously installed langpacks (stored in /var/lib/yum/plugins/langpacks)
# - any languages specified by $LANGUAGE
# - any langpacks listed in langpack_locales below
# -- if this variable is empty, the value of $LANG
#langpack_locales = ja_JP, zh_CN, mr_IN
# Added by Anaconda
langpack_locales=zh_CN.UTF-8
wq
保存退出,重启系统
二、解决方法二
如果上面方法还解决不了,简单粗暴点,删除完后再安装
[nangy@nangy-vm ~]$ sudo rm -f /var/run/yum.pid