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

hotips
  • 533
  • 4
  • 8
  • 19
  • may be duplicate of http://serverfault.com/questions/54591/how-to-install-change-locale-on-debian –  Sep 30 '12 at 14:29

3 Answers3

5

It seems that

apt-get install locales-all
solved my problem

Thanks !

hotips
  • 533
  • 4
  • 8
  • 19
0
apt-get install locales --reinstall
dpkg-reconfigure locales
Ben Lessani
  • 5,244
  • 17
  • 37
  • 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 from ALChacks import * File "/usr/share/apt-listchanges/ALChacks.py", line 32, in 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
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
quanta
  • 51,413
  • 19
  • 159
  • 217
  • 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 07:53