Tag Archives: Multiple Yum update error

[Solved] Multiple Yum update error: Failed to set locale, defaulting to C

Phenomenon:

yum update 
Failed to set locale, defaulting to C
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirrors.cqu.edu.cn
 * extras: mirrors.cn99.com
 * updates: mirrors.cn99.com
Resolving Dependencies
There are unfinished transactions remaining. You might consider running yum-complete-transaction, or "yum-complete-transaction --cleanup-only" and "yum history redo last", first to finish them. If those don't work you'll have to try removing/installing packages by hand (maybe package-cleanup can help).
--> Running transaction check
---> Package glibc.i686 0:2.17-317.el7 will be updated
--> Processing Dependency: glibc = 2.17-317.el7 for package: glibc-common-2.17-317.el7.x86_64
---> Package glibc.i686 0:2.17-325.el7_9 will be an update
--> Finished Dependency Resolution
Error: Package: glibc-common-2.17-317.el7.x86_64 (@anaconda)
           Requires: glibc = 2.17-317.el7
           Removing: glibc-2.17-317.el7.i686 (@base)
               glibc = 2.17-317.el7
           Updated By: glibc-2.17-325.el7_9.i686 (updates)
               glibc = 2.17-325.el7_9
           Available: glibc-2.17-322.el7_9.i686 (updates)
               glibc = 2.17-322.el7_9
           Available: glibc-2.17-323.el7_9.i686 (updates)
               glibc = 2.17-323.el7_9
           Available: glibc-2.17-324.el7_9.i686 (updates)
               glibc = 2.17-324.el7_9
 You could try using --skip-broken to work around the problem
** Found 23 pre-existing rpmdb problem(s), 'yum check' output follows:
32:bind-libs-lite-9.11.4-26.P2.el7_9.7.x86_64 is a duplicate with 32:bind-libs-lite-9.11.4-26.P2.el7_9.5.x86_64
32:bind-license-9.11.4-26.P2.el7_9.7.noarch is a duplicate with 32:bind-license-9.11.4-26.P2.el7_9.5.noarch
ca-certificates-2021.2.50-72.el7_9.noarch is a duplicate with ca-certificates-2020.2.41-70.0.el7_8.noarch
centos-release-7-9.2009.1.el7.centos.x86_64 is a duplicate with centos-release-7-9.2009.0.el7.centos.x86_64

Solution:

#yum-complete-transaction --cleanup-only
#yum history redo last
#package-cleanup --cleandupes
// Remove contradictory packages
#yum remove glibc-common-2.17-317.el7.x86_64 glibc-2.17-317.el7.i686
# yum update