Centos 5.8 locale warning

centoslocalization

A friend is running CentOS 5.8 on his server. It's a mostly harmless error but I'm tired of seeing it. I'm more familiar with debian, so I'm not sure how to generate or reconfigure locales. The usual binaries (locale-gen, dpkg, etc. ) I'm used to aren't on this server.

[root@localhost]# git pull origin master
bash: warning: setlocale: LC_ALL: cannot change locale (en_US.utf8)
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
    LANGUAGE = "en_GB:en",
    LC_ALL = "en_US.utf8",
    LANG = "en_GB"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
From git.com:www
 * branch            master     -> FETCH_HEAD
Already up-to-date.

Everything seems fine with the locales.

LANG=en_US.utf8
LC_CTYPE="en_US.utf8"
LC_NUMERIC="en_US.utf8"
LC_TIME="en_US.utf8"
LC_COLLATE="en_US.utf8"
LC_MONETARY="en_US.utf8"
LC_MESSAGES="en_US.utf8"
LC_PAPER="en_US.utf8"
LC_NAME="en_US.utf8"
LC_ADDRESS="en_US.utf8"
LC_TELEPHONE="en_US.utf8"
LC_MEASUREMENT="en_US.utf8"
LC_IDENTIFICATION="en_US.utf8"
LC_ALL=en_US.utf8

And it is a supported locale.

[root@localhost]# locale -a | grep en_US
en_US
en_US.iso88591
en_US.iso885915
en_US.utf8

Best Answer

What are the contents of /etc/sysconfig/i18n?

I typically set all of my servers to LANG="C" in that file. It's part of my build script, but it's helped me avoid terminal and emulation issues over the years. I'll update this with the real explanation later.

# /etc/sysconfig/i18n

LANG="C"
SYSFONT="latarcyrheb-sun16"