0

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

1

3 Answers 3

5

It seems that

apt-get install locales-all
solved my problem

Thanks !

0
apt-get install locales --reinstall
dpkg-reconfigure locales
1
  • 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, 2012 at 11:20
0
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
3
  • 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, 2012 at 11:15
  • Show us the output of the first command sudo locale-gen en_US en_US.UTF-8?
    – quanta
    Sep 25, 2012 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, 2012 at 7:53

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .