Nicolas Kovacs
2019-Dec-16 13:25 UTC
[CentOS] Yum on CentOS 8: Failed to set locale, defaulting to C
Hi, I'm currently fiddling with CentOS 8.0 on a sandbox server in order to get acquainted with its various quirks and idiosyncrasies. Here's the first curious detail I noticed. I used the CentOS installer in french (since I live in France), but I like my server systems to default to english. (If you've ever read one of these funny "frengrish" SELinux alerts, you'll understand why. Anyway.) After the installation, I ran this: # localectl set-locale LANG=en_US.UTF8 So here's what I have actually on my minimal system: $ localectl System Locale: LANG=en_US.UTF8 VC Keymap: ch-fr X11 Layout: ch X11 Variant: fr But my initial user still has system messages in french, so I added this to his ~/.bashrc: # LANG LANG=en_US.UTF8 export LANG I logged out and logged back in and tried the 'yum check-update' command, which normally doesn't require root privileges. And here's what I get: $ yum check-update Failed to set locale, defaulting to C Last metadata expiration check: 0:17:42 ago on Mon Dec 16 14:04:39 2019. Any idea on how to make Yum behave here? Cheers, Niki -- Microlinux - Solutions informatiques durables 7, place de l'?glise - 30730 Montpezat Site : https://www.microlinux.fr Mail : info at microlinux.fr T?l. : 04 66 63 10 32 Mob. : 06 51 80 12 12
Nicolas Kovacs
2019-Dec-16 13:46 UTC
[CentOS] Yum on CentOS 8: Failed to set locale, defaulting to C
Le 16/12/2019 ? 14:25, Nicolas Kovacs a ?crit?:> I logged out and logged back in and tried the 'yum check-update' command, which > normally doesn't require root privileges. And here's what I get: > > $ yum check-update > Failed to set locale, defaulting to C > Last metadata expiration check: 0:17:42 ago on Mon Dec 16 > 14:04:39 2019. > > Any idea on how to make Yum behave here?I'll answer this myself, since I just found the culprit. I posted my initial message after having waded through various blog posts, each with different suggestions on how to handle the issue. And I just found out that the answer is as simple as this: $ sudo yum install glibc-langpack-en Cheers, Niki -- Microlinux - Solutions informatiques durables 7, place de l'?glise - 30730 Montpezat Site : https://www.microlinux.fr Mail : info at microlinux.fr T?l. : 04 66 63 10 32 Mob. : 06 51 80 12 12