侧边栏壁纸
博主头像
聆尘风博主等级

欲买桂花同载酒,终不似,少年游

  • 累计撰写 56 篇文章
  • 累计创建 17 个标签
  • 累计收到 2 条评论

目 录CONTENT

文章目录

Linux update不能更新

聆尘风
2024-03-19 / 0 评论 / 1 点赞 / 12 阅读 / 1733 字

Centos 7 常用命令无法正常执行

yum update -y 更新出现被锁定

方法一:强制关掉yum进程

rm -rf /var/run/yum.pid

方法二:永久禁用PackageKit

PackageKit是一个离线更新服务,基本没啥用,应该永久禁用

cat/ etc/yum/pluginconf.d/langpacks.conf

[main]
enabled=0             ## 将 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
<p>[root@txh ~]# yum repolist
已加载插件:fastestmirror
Loading mirror speeds from cached hostfile</p>
<ul>
<li>base: mirrors.aliyun.com</li>
<li>extras: mirrors.aliyun.com</li>
<li>updates: mirrors.aliyun.com
源标识                    源名称                                                   状态
base/7/x86_64             CentOS-7 - Base - mirrors.aliyun.com                     10,019
epel/x86_64               Extra Packages for Enterprise Linux 7 - x86_64           13,336
extras/7/x86_64           CentOS-7 - Extras - mirrors.aliyun.com                      419
updates/7/x86_64          CentOS-7 - Updates - mirrors.aliyun.com                   2,500
zh                        zh                                                        4,021
repolist: 30,295

1

评论区