yum install -y yum-utils 报错Error: Package: glibc-2.17-307.el7.1.i686 (base)

发布时间 2023-05-05 21:48:59作者: 浮~生

命令#yum install -y yum-utils

执行命令和报错如下

[root@localhost ~]# yum install -y yum-utils.noarch
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Resolving Dependencies
--> Running transaction check
---> Package yum-utils.noarch 0:1.1.31-53.el7 will be installed
--> Processing Dependency: python-kitchen for package: yum-utils-1.1.31-53.el7.noarch
--> Processing Dependency: libxml2-python for package: yum-utils-1.1.31-53.el7.noarch
--> Running transaction check
---> Package libxml2-python.x86_64 0:2.9.1-6.el7.4 will be installed
--> Processing Dependency: libxml2 = 2.9.1-6.el7.4 for package: libxml2-python-2.9.1-6.el7.4.x86_64
---> Package python-kitchen.noarch 0:1.1.1-5.el7 will be installed
--> Processing Dependency: python-chardet for package: python-kitchen-1.1.1-5.el7.noarch
--> Running transaction check
---> Package libxml2.i686 0:2.9.1-6.el7.4 will be installed
--> Processing Dependency: libz.so.1(ZLIB_1.2.3.3) for package: libxml2-2.9.1-6.el7.4.i686
--> Processing Dependency: libz.so.1(ZLIB_1.2.2.3) for package: libxml2-2.9.1-6.el7.4.i686
--> Processing Dependency: libz.so.1 for package: libxml2-2.9.1-6.el7.4.i686
--> Processing Dependency: libm.so.6(GLIBC_2.1) for package: libxml2-2.9.1-6.el7.4.i686
--> Processing Dependency: libm.so.6(GLIBC_2.0) for package: libxml2-2.9.1-6.el7.4.i686
--> Processing Dependency: libm.so.6 for package: libxml2-2.9.1-6.el7.4.i686
--> Processing Dependency: liblzma.so.5(XZ_5.0) for package: libxml2-2.9.1-6.el7.4.i686
--> Processing Dependency: liblzma.so.5 for package: libxml2-2.9.1-6.el7.4.i686
--> Processing Dependency: libdl.so.2(GLIBC_2.1) for package: libxml2-2.9.1-6.el7.4.i686
--> Processing Dependency: libdl.so.2(GLIBC_2.0) for package: libxml2-2.9.1-6.el7.4.i686
--> Processing Dependency: libdl.so.2 for package: libxml2-2.9.1-6.el7.4.i686
--> Processing Dependency: libc.so.6(GLIBC_2.15) for package: libxml2-2.9.1-6.el7.4.i686
---> Package python-chardet.noarch 0:2.2.1-3.el7 will be installed
--> Running transaction check
---> Package glibc.i686 0:2.17-307.el7.1 will be installed
--> Processing Dependency: glibc-common = 2.17-307.el7.1 for package: glibc-2.17-307.el7.1.i686
--> Processing Dependency: libfreebl3.so(NSSRAWHASH_3.12.3) for package: glibc-2.17-307.el7.1.i686
--> Processing Dependency: libfreebl3.so for package: glibc-2.17-307.el7.1.i686
---> Package xz-libs.i686 0:5.2.2-1.el7 will be installed
---> Package zlib.i686 0:1.2.7-18.el7 will be installed
--> Running transaction check
---> Package glibc.i686 0:2.17-307.el7.1 will be installed
--> Processing Dependency: glibc-common = 2.17-307.el7.1 for package: glibc-2.17-307.el7.1.i686
---> Package nss-softokn-freebl.i686 0:3.44.0-8.el7_7 will be installed
--> Finished Dependency Resolution
Error: Package: glibc-2.17-307.el7.1.i686 (base)
           Requires: glibc-common = 2.17-307.el7.1
           Installed: glibc-common-2.17-317.el7.x86_64 (@anaconda)
               glibc-common = 2.17-317.el7
           Available: glibc-common-2.17-307.el7.1.x86_64 (base)
               glibc-common = 2.17-307.el7.1
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

解决

#wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
#sed -i  's/$releasever/7/g' /etc/yum.repos.d/CentOS-Base.repo
#yum repolist 

然后重新安装即可

# yum install -y yum-utils.noarch