Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have problems with locale in debian. I tried many thing but it doesn't anything for me :

locale -a
locale: Cannot set LC_CTYPE to default locale: No such file or directory C POSIX en_US.utf8

I try to set en_US.utf8 without success with this :

dpkg-reconfigure locales -plow
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
    LANGUAGE = "en_US",
    LC_ALL = (unset),
    LC_CTYPE = "UTF-8",
    LANG = (unset)
    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_ALL to default locale: No such file or directory
/usr/bin/locale: Cannot set LC_CTYPE to default locale: No such file or directory
/usr/bin/locale: Cannot set LC_ALL to default locale: No such file or directory
Generating locales (this might take a while)...
  en_US.UTF-8... done
Generation complete.
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
    LANGUAGE = "en_US",
    LC_ALL = (unset),
    LC_CTYPE = "UTF-8",
    LANG = (unset)
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
    LANGUAGE = "en_US",
    LC_ALL = (unset),
    LC_CTYPE = "UTF-8",
    LANG = (unset)
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").

After reboot, i try to use a perl script :

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

Here is my /etc/default/locale config file :

cat /etc/default/locale 
LANG=en_US.UTF-8
LANGUAGE=en_US

Any idea to solve this (stupid) problem ?

Thanks

share|improve this question
    
may be duplicate of serverfault.com/questions/54591/… –  coincoin Sep 30 '12 at 14:29

3 Answers 3

apt-get install locales --reinstall
dpkg-reconfigure locales
share|improve this answer
    
it didn't workded too : apt-get install locales --reinstall (...) 0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded. Need to get 0 B/4761 kB of archives. After this operation, 0 B of additional disk space will be used. Traceback (most recent call last): File "/usr/bin/apt-listchanges", line 33, in <module> from ALChacks import * File "/usr/share/apt-listchanges/ALChacks.py", line 32, in <module> sys.stderr.write(("Can't set locale; make sure $LC_* and $LANG are correct!\n")) NameError: name '' is not defined Any other idea ? –  hotips Sep 25 '12 at 11:20
locale: Cannot set LC_CTYPE to default locale: No such file or directory

Install the missing en_US locale by running:

sudo locale-gen en_US en_US.UTF-8

then:

sudo dpkg-reconfigure locales
share|improve this answer
    
it didn't worked for me : perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LANGUAGE = "en_US", LC_ALL = (unset), LC_CTYPE = "UTF-8", LANG = "en_US.UTF-8" are supported and installed on your system. perl: warning: Falling back to the standard locale ("C"). –  hotips Sep 25 '12 at 11:15
    
Show us the output of the first command sudo locale-gen en_US en_US.UTF-8? –  quanta Sep 25 '12 at 14:05
    
locale-gen en_US en_US.UTF-8 Generating locales (this might take a while)... en_US.UTF-8... done Generation complete. –  hotips Sep 28 '12 at 7:53
up vote 0 down vote accepted

It seems that

apt-get install locales-all
solved my problem

Thanks !

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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