Debian's most annoying warning message: "Setting locale failed"
You ssh into a server or you enter a chroot, and the console overflows with these messages:
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = "en_US:en",
LC_ALL = (unset),
LC_TIME = "en_US.utf8",
LC_CTYPE = "de_AT.UTF-8",
LC_COLLATE = "C",
LC_MESSAGES = "en_US.utf8",
LANG = "de_AT.UTF-8"
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
Gaaaaarrrrh!
Fortunately the fix is easy (adjust the locale names for your situation):
locale-gen en_US.UTF-8 de_AT.UTF-8
Finally, peace on the console.