Ubuntu meerkat Perl setting locale failed

Asked by Robert Kay on 2011-04-18

I've searched forums and all the suggestions given hasn't worked for me. I'm getting this message:

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

Here is my: more /etc/environment

And here's the locale.alias:

grep en_US locale.alias
en_US ISO-8859-1
en_US.ISO-8859-15 ISO-8859-15
en_US.UTF-8 UTF-8

I've tried:
sudo locale-gen
sudo dpkg-reconfigure locales
sudo locale-gen en_US.UTF8
sudo apt-get installed locales
sudo apt-get install language-pack-en
(of course not in this particular order but have ran them several times).

I still get the error. What's next?


Question information

English Edit question
Ubuntu langpack-locales Edit question
No assignee Edit question
Solved by:
Robert Kay
Last query:
Last reply:
Robert Kay (rhxk) said : #1

After a bit more research, I was able to find the solution:

Basically the solution / fix is to make sure the following is set in either your ~/.profile or ~/.bashrc or ~/.cshrc

# This setting is for the new UTF-8 terminal support
export LC_CTYPE=en_US.UTF-8
export LC_ALL=en_US.UTF-8

And it's done!

Ayan (ayanm) said : #2

Thank you. That solved my problem with Natty when all other fixes failed.