0

Heyo~

I am having an issue whenever I change locale. At present, I am getting this error whenever I run the locale command.

locale: Cannot set LC_ALL to default locale: No such file or directory

LANG=

LANGUAGE=en en

LC_CTYPE="POSIX"

LC_NUMERIC=en

LC_TIME=en

LC_COLLATE="POSIX"

LC_MONETARY=en

LC_MESSAGES="POSIX"

LC_PAPER=en

LC_NAME=en

LC_ADDRESS=en

LC_TELEPHONE=en

LC_MEASUREMENT=en

LC_IDENTIFICATION=en

LC_ALL=

After entering root using 'sudo -i' or 'sudo su', I use 'export LC_ALL="en_GB"'. Using locale whilst in root gives this.

LANG=

LANGUAGE=en en

LC_CTYPE="en_GB"

LC_NUMERIC="en_GB"

LC_TIME="en_GB"

LC_COLLATE="en_GB"

LC_MONETARY="en_GB"

LC_MESSAGES="en_GB"

LC_PAPER="en_GB"

LC_NAME="en_GB"

LC_ADDRESS="en_GB"

LC_TELEPHONE="en_GB"

LC_MEASUREMENT="en_GB"

LC_IDENTIFICATION="en_GB"

LC_ALL=en_GB

However, after leaving root, via 'exit', 'reboot' or simply closing the Terminal, the changes completely revert and the "locale: Cannot set LC_ALL to default locale: No such file or directory" error returns. The output of 'locale' is the same as before I used 'export LC_ALL="en_GB"'

I've attempted to use 'dpkg-reconfigure locales' to no effect.

Anyone know how to fix this?

  • Doing export LC_ALL=, whether in root or not, you set locale for the current process (and its descendants), not for the operating system. You’re in the Unix world ☺ – Incnis Mrsi Sep 4 '15 at 22:35
0

Your locale is a complete mess.

  • Please go to "System Settings -> Language Support".
  • Drag the language of your choice to the top, and click "Apply system-wide".
  • Move to the "Regional Formats" tab, select the region of your choice, and click "Apply system-wide".
  • Reboot.

Hopefully that does it.

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.