Tuesday, September 25, 2012

Debian apt locale errors

Ok, every once in a while, I play with Debian or Ubuntu machines. Recently, on Squeeze, I started getting errors like these. Probably something with my locale has changed, but I'm not sure what and when.
0 packages upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
Need to get 0 B of archives. After unpacking 0 B will be used.
Do you want to continue? [Y/n/?]
perl: warning: Setting locale failed.   
perl: warning: Please check that your locale settings:
    LANGUAGE = "en_US:",
    LC_ALL = (unset),
    LC_TIME = "nl_NL.utf8",
    LC_MONETARY = "nl_NL.utf8",
    LC_CTYPE = "en_US.UTF-8",
    LC_COLLATE = "en_US.UTF-8",
    LC_MESSAGES = "en_US.UTF-8",
    LC_MEASUREMENT = "nl_NL.utf8",
    LC_NUMERIC = "nl_NL.utf8",
    LANG = "en_US"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
locale: Cannot set LC_ALL to default locale: No such file or directory
These errors pop up every time I use apt. Now there used to be a configuration file somewhere in /etc that allowed me to set locales in Debian, I'm pretty sure there was. But it's gone.

Apparently, one now has to edit a file in /var. Not sure why a configuration file ends up there, but hey, I'm not an OS developer. Anyway, you need to edit /var/lib/locales/supported.d/local and add your own locale, in my case "nl_NL.UTF-8 UTF-8". After that, just run
$ sudo locale-gen
like you used to. Very strange place to put a configuration file...

1 comment:

sehatwanita said...

This information is very useful. thank you for sharing. and I will also share information about health through the website

Cara Mengobati Sinusitis
Penyebab Mual dan BAB Berdarah
Perawatan kesehatan mata
Bahaya Tenggorokan Nyeri
Cara Mengatasi asam Lambung
Cara Mengobati Usus Buntu