For a long time and every time it updated the Debian system on my machine sack me the error; locale: can not Sept. LC_CTYPE to default locale: No such file or directory. Until one day I am tired because the installation of the packages started to take too long.

If you have the same error, or a similar means that the environment variable (in this case LC_TYPE) does not contain a value that the system can recognize. This may be due to the following reasons;

  • The locale seteado in the system is badly written.
  • The specified locale is not installed on your system

To be sure that this well-typed the name of the locale or that this is installed, type;


  fher98 @ betuntu: ~ $ locale-a 
 C 
 en_AU.utf8 
 en_BW.utf8 
 en_CA.utf8 
 en_DK.utf8 
 en_GB.utf8 
 en_HK.utf8 
 en_IE.utf8 
 en_IN 
 en_NZ.utf8 
 en_PH.utf8 
 en_SG.utf8 
 en_US.utf8 
 en_ZA.utf8 
 en_ZW.utf8 
 POSIX 


In the locale where we see if we specify this within the drop down list above. If you are not on the list, we need to install it.

Reconfiguring locale

http://people.debian.org/ ~ schultmc / locales.html

sudo dpkg-reconfigure locales

http://listas.udistrital.edu.co/pipermail/linux/2006-April/001896.html

http://people.debian.org/ ~ schultmc / locales.html

How easy, how Debian

First we installed templates, then run the command to configure them, as root;


  deathbian: ~ # aptitude update 
  deathbian: ~ # aptitude install debconf 
  deathbian: ~ # dpkg-reconfigure locales 


How hard to Redhat, Centos

As a super user edit the file / etc / locale.gen. If the file does not exist, we need to create. Below is a sample file. Then run the command to generate it;


  deathbian: ~ # / usr / sbin / locale-gen 


file: / etc / locale.gen

# This file lists premises that you wish to have built. You can find a list
# Of valid supported at local / usr/share/i18n/SUPPORTED. Other
# Combinations are possible, but may not be well tested. If you change
# This file, you need to rerun locale-gen.
#
# GENERATED XXX XXX
#
# NOTE! If you change this file by hand, and want to continue
# Maintaining manually, remove the above line. Otherwise, use the command
# "Dpkg-reconfigure locales" to manipulate this file. You can manually
# Change this file without affecting the use of templates, however, since it
# Does read in your changes.

en_US.UTF-8 UTF-8

Popularity: 1% [?]