当yum安装出现Error: Package: glibc-headers .....时

环境

CentOS Linux release 7.4.1708 (Core)
 

当使用yum源安装时,出现以下报错

Error: Package: glibc-headers-2.17-.el7_4..x86_64 (ultra-centos-7.4-updates)
Requires: glibc = 2.17-.el7_4.
Installed: glibc-2.17-.el7.x86_64 (installed)
glibc = 2.17-.el7
Available: glibc-2.17-.el7.x86_64 (ultra-centos-7.4-base)
glibc = 2.17-.el7
Available: glibc-2.17-.el7_4..x86_64 (ultra-centos-7.4-updates)
glibc = 2.17-.el7_4.
Error: Package: gcc-4.8.-.el7_4..x86_64 (ultra-centos-7.4-updates)
Requires: libgomp = 4.8.-.el7_4.
Installed: libgomp-4.8.-.el7_5..x86_64 (installed)
libgomp = 4.8.-.el7_5
libgomp = 4.8.-.el7_5.
Available: libgomp-4.8.-.el7.x86_64 (ultra-centos-7.4-base)
libgomp = 4.8.-.el7
libgomp = 4.8.-.el7
Available: libgomp-4.8.-.el7_4..x86_64 (ultra-centos-7.4-updates)
libgomp = 4.8.-.el7_4.
libgomp = 4.8.-.el7_4
Available: libgomp-4.8.-.el7_4..x86_64 (ultra-centos-7.4-updates)
libgomp = 4.8.-.el7_4.
libgomp = 4.8.-.el7_4
Error: Package: glibc-devel-2.17-.el7_4..x86_64 (ultra-centos-7.4-updates)
Requires: glibc = 2.17-.el7_4.
Installed: glibc-2.17-.el7.x86_64 (installed)
glibc = 2.17-.el7
Available: glibc-2.17-.el7.x86_64 (ultra-centos-7.4-base)
glibc = 2.17-.el7
Available: glibc-2.17-.el7_4..x86_64 (ultra-centos-7.4-updates)
glibc = 2.17-.el7_4.
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
 
 
 
 
上一篇:java学习笔记--this 关键字的理解


下一篇:NOT EXISTS优化