yum 安装gcc时候提示报错:

---> Package kernel-headers.x86_64 0:3.10.0-957.1.3.el7 will be installed
---> Package nss-softokn-freebl.i686 0:3.36.0-5.el7_5 will be installed
--> Finished Dependency Resolution
Error: Package: glibc-2.17-260.el7.i686 (rhel-7-server-rpms)
           Requires: glibc-common = 2.17-260.el7
           Installed: glibc-common-2.17-307.el7.1.x86_64 (@base)
               glibc-common = 2.17-307.el7.1
           Available: glibc-common-2.17-260.el7.x86_64 (rhel-7-server-rpms)
               glibc-common = 2.17-260.el7
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest
[root@chg nginx-1.22.0]# rpm -qa |grep glibc-common
glibc-common-2.17-307.el7.1.x86_64

解决办法:

通过yum downgrade降级版本

yum downgrade glibc glibc-devel glibc-common glibc-headers

注意:glibc这几个包都是互相关联的,所以仅仅降级glibc-common是不行的

再次执行yum install gcc -y 即可安装成功

Logo

华为开发者空间,是为全球开发者打造的专属开发空间,汇聚了华为优质开发资源及工具,致力于让每一位开发者拥有一台云主机,基于华为根生态开发、创新。

更多推荐