Ubuntu meerkat Perl setting locale failed

Asked by Robert Kay

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
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games"
LANGUAGE="en_US:en"
LANG="en_US.UTF-8"

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?

Thanks,
--Robert

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu langpack-locales Edit question
Assignee:
No assignee Edit question
Solved by:
Robert Kay
Solved:
Last query:
Last reply:
Revision history for this message
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!

Revision history for this message
Ayan (ayanm) said :
#2

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