Wednesday, August 16, 2006

LOCALES

Ok, this one was nasty..
whenever i apt-get anything on my Debian server i got these errors

locale: Cannot set LC_CTYPE to default locale: No such file or directory

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

it was driving me crazy.. until i found a thread that said:
run "dpkg-reconfigure locales" as root user

and choose the locale u want..
and ummmm.. don't forget to restart.. :D

if this doesn't work..
apt-get install localeconf

Select locales to install (e.g. en_US ISO-8859-1) and select the standard locale (e.g. en_US).

You will be asked a few questions:

Manage locale configuration files with debconf? <-- Yes
Environment settings that should override the default locale: <-- do not select anything
Replace existing locale configuration files? <-- Yes
Default system locale: <-- e.g. en_US ISO-8859-1

ok.. and don't forget to restart

you should find everything working fine now.. to check run
#locales

you will get your output with no errors now..

so why did this happen.. simply the variables LC_CTYPE LC_MESSAGES LC_ALL were set to a locale that is not installed.. so reconfiguring and restarting sets things right

No comments: