Fix locale problems in Raspbian

If you get errors like this while running commands on your Raspbian:

perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
        LANGUAGE = (unset),
        LC_ALL = (unset),
        LC_TIME = "es_ES.utf-8",
        LC_MONETARY = "es_ES.utf-8",
        LC_CTYPE = "es_ES.utf-8",
        LC_COLLATE = "es_ES.utf-8",
        LC_MESSAGES = "es_ES.utf-8",
        LC_NUMERIC = "es_ES.utf-8",
        LANG = "C"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").

Or 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_ALL to default locale: No such file or directory
/usr/bin/locale: Cannot set LC_CTYPE to default locale: No such file or directory
/usr/bin/locale: Cannot set LC_MESSAGES to default locale: No such file or directory
/usr/bin/locale: Cannot set LC_ALL to default locale: No such file or directory

You may have to edit /etc/default/locale and add the default locales:

LANG=en_GB.UTF-8
LC_ALL=en_GB.UTF-8
LANGUAGE=en_GB.UTF-8

locale-01

You might also like

Configure the locale and keyboard layout in Raspbian
I have a keyboard with the spanish layout (with the "ñ" key, etc.) but Raspbian comes by default only...

Collada-dom 3D models having black textures bug solution
I used to have a problem with Collada-dom 3D models textures. Some times they were not correctly applied...

Disable automatic locale variables setting in terminal emulator for Mac OS X
Terminal emulators usually send your current locale when conecting to an SSH server. I use Mac OS X in...

TP-Link TL-WN725N version 2 in Raspbian 2014-01-07-wheezy-raspbian with kernel 3.10.25+
UPDATE: Read this post if you have another version of the kernel and want use a script to compile the...

  1. Muchas gracias, me estaba volviendo loco con este problema, ya llevaba dos días reinstalando raspbian y deconfigurando todo lo encontraba.

  2. Thanks very much about that.
    I solved that.

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.