报错如下:

    file /usr/lib64/gconv/libISOIR165.so from install of glibc-2.28-164.el8.x86_64 conflicts with file from package glibc-2.17-317.el7
    file /usr/lib64/gconv/libJIS.so from install of glibc-2.28-164.el8.x86_64 conflicts with file from package glibc-2.17-317.el7.x86_
    file /usr/lib64/gconv/libJISX0213.so from install of glibc-2.28-164.el8.x86_64 conflicts with file from package glibc-2.17-317.el7
    file /usr/lib64/gconv/libKSC.so from install of glibc-2.28-164.el8.x86_64 conflicts with file from package glibc-2.17-317.el7.x86_
    file /usr/lib64/libmemusage.so from install of glibc-2.28-164.el8.x86_64 conflicts with file from package glibc-2.17-317.el7.x86_6
    file /usr/lib64/libpcprofile.so from install of glibc-2.28-164.el8.x86_64 conflicts with file from package glibc-2.17-317.el7.x86_
    file /usr/libexec/getconf/POSIX_V6_LP64_OFF64 from install of glibc-2.28-164.el8.x86_64 conflicts with file from package glibc-2.1
    file /usr/libexec/getconf/POSIX_V7_LP64_OFF64 from install of glibc-2.28-164.el8.x86_64 conflicts with file from package glibc-2.1
    file /usr/libexec/getconf/XBS5_LP64_OFF64 from install of glibc-2.28-164.el8.x86_64 conflicts with file from package glibc-2.17-31
    file /usr/sbin/iconvconfig from install of glibc-2.28-164.el8.x86_64 conflicts with file from package glibc-2.17-317.el7.x86_64

解决办法:

rpm -ivh glibc-* --replacefiles

添加--replacefiles参数。