4

We are running a Werewolf cluster and the node images are missing the locales. Only C and POSIX are available. The system uses CentOS 7 as base.

It isn't really an issue but it's a very annoying to receive warnings at each command, like those:

locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_COLLATE to default locale: No such file or directory

I've double checked if glibc is installed and everything appears to be ok:

[root@n01 ~]# rpm -qa | grep -i glibc
glibc-common-2.17-106.el7_2.6.x86_64
glibc-headers-2.17-106.el7_2.6.x86_64
glibc-2.17-106.el7_2.6.x86_64
glibc-devel-2.17-106.el7_2.6.x86_64 

And locale -a outputs this:

locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_COLLATE to default locale: No such file or directory
C
POSIX

Any idea to generate all the missing locales?

HBruijn
  • 72,524
  • 21
  • 127
  • 192
Vinícius Ferrão
  • 5,400
  • 10
  • 52
  • 91

2 Answers2

2

A tad late, but yum has glibc-langpack-* modules:

yum list glibc-langpack-\*
Jelmer Jellema
  • 311
  • 2
  • 8
1

You could try

yum reinstall glibc-common

which should just erm, reinstall the package.

user9517
  • 114,104
  • 20
  • 206
  • 289
  • 1
    Already tried this. Unfortunately it does not work. :( – Vinícius Ferrão Jul 09 '16 at 19:47
  • 1
    It would have been a good thing to mention that then. – user9517 Jul 09 '16 at 20:50
  • @ViníciusFerrão did you solve this? Same problem for me on a brand new AWS EC2 instance. I'm missing the language packs and cannot figure out how to generate them. – EvilJordan Sep 16 '19 at 23:17
  • 1
    Update: I fixed this, probably not in the best way, but it works, and could not find any solution to reinstalling/replacing the missing files another way. My `/usr/share/i18n/locales` and `/usr/share/i18n/charmaps` folders were completely empty. No amount of reinstalling packages seemed to fix this. I finally took the contents of the folder from another instance that was working fine, then ran `sudo localedef -i en_US -f UTF-8 en_US.UTF-8` to generate the locale information for me. `locale -a` now shows en_US as available and all my errors are gone. – EvilJordan Sep 16 '19 at 23:41