1

I have a system running Arch, which seems to be OK, except I often get messages like man: can't set the locale; make sure $LC_* and $LANG are correct

When I run locale I get the following

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_ALL to default locale: No such file or directory
LANG=en_AU.UTF-8
LC_CTYPE="en_AU.UTF-8"
LC_NUMERIC="en_AU.UTF-8"
LC_TIME="en_AU.UTF-8"
LC_COLLATE="en_AU.UTF-8"
LC_MONETARY="en_AU.UTF-8"
LC_MESSAGES="en_AU.UTF-8"
LC_PAPER="en_AU.UTF-8"
LC_NAME="en_AU.UTF-8"
LC_ADDRESS="en_AU.UTF-8"
LC_TELEPHONE="en_AU.UTF-8"
LC_MEASUREMENT="en_AU.UTF-8"
LC_IDENTIFICATION="en_AU.UTF-8"
LC_ALL=

Everything looks OK, and LC_CTYPE etc are set


locale-gen seems to have made no difference and locale -a produces the following:-

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

Obviously locale -a did not include my locale, even though /etc/locale.gen looked OK and locale-gen had been run. I deleted LANG and rerun, it is now OK.

  • What does locale -a say? – daisy Feb 7 '17 at 5:55
1

It looks like you need to run locale-gen command to create missing directories.

https://wiki.archlinux.org/index.php/locale

  • 1
    I needed to kill LANG but ultimately this helped me fix the issue. – Milliways Feb 7 '17 at 6:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.