Roland Turner

about | contact

“perl: warning: Setting locale failed.” “perl: warning: Please check that your locale settings:”

Another nit:

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

The fix – at least for English-speakers – is:

apt-get install language-pack-en

2012-05-06 UPDATE: While rehabilitating a batch of old blog posts, I noted that I’d posted a solution to this problem before. It doesn’t quite work as written, but did lead me to discover that the key is a tool called locale-gen. To deal with the problem above (non-existence of en_AU.UTF-8), simply do:

# locale-gen en_AU.UTF-8
Generating locales...
en_AU.UTF-8... done
Generation complete.
#