yum downgrade降级安装包
问题
安装gcc gcc-c++ make等编译包,提示glibc错误依赖
--> Finished Dependency Resolution
Error: Package: glibc-headers-2.17-317.el7.x86_64 (centos7)
Requires: glibc = 2.17-317.el7
Installed: glibc-2.17-326.el7_9.x86_64 (@anaconda)
glibc = 2.17-326.el7_9
Available: glibc-2.17-317.el7.x86_64 (centos7)
glibc = 2.17-317.el7
Error: Package: glibc-devel-2.17-317.el7.x86_64 (centos7)
Requires: glibc = 2.17-317.el7
Installed: glibc-2.17-326.el7_9.x86_64 (@anaconda)
glibc = 2.17-326.el7_9
Available: glibc-2.17-317.el7.x86_64 (centos7)
glibc = 2.17-317.el7
You could try using --skip-broken to work around the problem
分析是:
安装依赖的包已经安装高版本的,因此需要降级安装低版本解决或者卸载高版本,建议降级安装低版本
解决
//降级安装
yum downgrade -y glibc glibc-common
//再次执行,完美执行成功
yum install -y make autoconfig gcc gcc-c++