Setting Up Locales

Minimal server installs (as is the case with VPS instances) often do not have a locale installed/generated (or at least, not for your particular locale).

A symptom of this looks something like:

$ perl -e 1
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
        LANGUAGE = (unset),
        LC_ALL = (unset),
        LANG = "en_AU.utf8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").

Steps to generate/install the locale so that this problem does not occur:

  1. Simplest approach (works on recent distributions as of late 2010):

    sudo dpkg-reconfigure locales
  2. More manual approach (found here: (if the previous does not work):

    $ cd /usr/share/locales
    $ ./install-language-pack en_AU
    $ dpkg-reconfigure locales

BradsWiki: SettingUpLocales (last edited 2011-02-10 03:12:04 by BradleyDean)