Tag Archives: yum Install gcc Error

[Solved] yum Install gcc Error: Error: Package: glibc-headers-2.17-317.el7.x86_64

When installing Nignx
Installing the GCC compiler

yum install -y gcc

Report an error as below:

Error: Package: glibc-headers-2.17-317.el7.x86_64 (base)
           Requires: glibc = 2.17-317.el7
           Installed: glibc-2.17-322.el7_9.i686 (@c6-update)
               glibc = 2.17-322.el7_9
           Available: glibc-2.17-317.el7.i686 (base)
               glibc = 2.17-317.el7
Error: Package: glibc-devel-2.17-317.el7.x86_64 (base)
           Requires: glibc = 2.17-317.el7
           Installed: glibc-2.17-322.el7_9.i686 (@c6-update)
               glibc = 2.17-322.el7_9
           Available: glibc-2.17-317.el7.i686 (base)
               glibc = 2.17-317.el7
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

Show one installed version higher than the required version

Resolved by downgrading.

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

Installation success!

Installed:
  gcc.x86_64 0:4.8.5-44.el7                                                                                                                                           

Dependency Installed:
  cpp.x86_64 0:4.8.5-44.el7 glibc-devel.x86_64 0:2.17-317.el7 glibc-headers.x86_64 0:2.17-317.el7 kernel-headers.x86_64 0:3.10.0-1160.el7 libmpc.x86_64 0:1.0.1-3.el7
  mpfr.x86_64 0:3.1.1-4.el7

Complete!