Setting locale failed

Somehow I managed to mess up the locales configuration on my Raspbian Linux. I started getting the following error message

perl: warning: Setting locale failed.  
perl: warning: Please check that your locale settings:  
        LANGUAGE = "en_US.UTF-8",
        LC_ALL = "en_US.UTF-8",
        LC_PAPER = "de_DE.UTF-8",
        LC_ADDRESS = "de_DE.UTF-8",
        LC_MONETARY = "de_DE.UTF-8",
        LC_NUMERIC = "de_DE.UTF-8",
        LC_TELEPHONE = "de_DE.UTF-8",
        LC_IDENTIFICATION = "de_DE.UTF-8",
        LC_MEASUREMENT = "de_DE.UTF-8",
        LC_TIME = "de_DE.UTF-8",
        LC_NAME = "de_DE.UTF-8",
        LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").  

The solution to this problem is quite simple. You have to run dpkg-reconfigure

sudo dpkg-reconfigure locales  

Select the correct locales for your setup in the dialog window and hit 'ok'. In the next screen can apply those locales system wide.

Andreas Fritzler

Read more posts by this author.