Fix Locale Errors

Thu 02 October 2014
By alex

In an effort to minimize a system's footprint, providers will sometimes rip out the language files. This will cause irritating locale errors such as:

perl: warning: Setting locale failed. 
perl: warning: Please check that your locale settings:
LANGUAGE = "",
LC_ALL = (unset),
LANG = "",
are supported and installed on your system. 
perl: warning: Falling back to the standard locale ("C"). 
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

Here's the fix:

sudo locale-gen en_US en_US.UTF-8
dpkg-reconfigure locales