Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

This question already has an answer here:

Due to some strange reason, I've lost some of my locale settings. I've managed to restore most of them using sudo dpkg-reconfigure locales:

perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
 LANGUAGE = (unset),
 LC_ALL = (unset),
 LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
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

So I'm stuck with one missing value:

$ locale
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
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=

Any idea how to restore them all?

Thanks,

Adam

share|improve this question

marked as duplicate by Tachyons, Luis Alvarado Apr 19 '13 at 16:27

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

5 Answers 5

up vote 3 down vote accepted

In case you've deleted some files, try reinstalling the locale package:

apt-get install --reinstall locales

You may want to do the same for language-support-(your langcode), language-pack-(your langcode)-base and other language packs (gnome, kde...) for your language.

share|improve this answer

Happens to me occasionally too. Not sure what causes it but I just fire off:

sudo dpkg-reconfigure locales

And that seems to fix it (for me)

share|improve this answer

This is what I had to do to fix this:

sudo apt-get install --reinstall language-support-en
share|improve this answer

I run into this problem from time to time and none of the above answers help me. What actually helps me is adding the following to /etc/default/locales

LANG="en_US.UTF-8"
LANGUAGE="en_US"
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE=en_US.UTF-8
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES=en_US.UTF-8
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
share|improve this answer

Any of given answers didn't help me, but I found this:

http://ubuntuforums.org/showpost.php?p=12183173&postcount=6

and it made the trick.

share|improve this answer
    
Can you explain how its work? –  penreturns Oct 7 '12 at 15:20
    
My case was this: Ubuntu froze and I've had to shut the laptop down. When I logged in, some (but not all) window titles etc. were in Chinese. Following the post instructions helped (I'm using a non-english (Croatian) locale) since my settings were overriten with zh_CH (chinese) –  Andrija Dec 3 '12 at 16:23

Not the answer you're looking for? Browse other questions tagged or ask your own question.