原文地址:http://codewut.de/content/missing-locales-under-debian
This drives me crazy! Every time I debootstrap a debian or ubuntu machine the resulting root system will lack properly set up locales. dpkg-reconfigure locales & derivates won't help since the system does not know what locales it should generate - and for some reason it does not show that nice ncurses UI where you were able to pick the locales you would like to have the support for.
So, there goes another blog entry which should act as my personal notepad for future accidents like this:
-
root@baracus: # cat /usr/share/i18n/SUPPORTED | egrep en_US > /var/lib/locales/supported.d/en
-
root@baracus: # cat /usr/share/i18n/SUPPORTED | egrep de_DE > /var/lib/locales/supported.d/de
-
root@baracus: # locale-gen
-
Generating locales...
-
de_DE.ISO -8859 -1... up-to- date
-
de_DE.UTF -8... up-to- date
-
de_DE.ISO -8859 -15@euro... up-to- date
-
en_US.ISO -8859 -1... done
-
en_US.UTF -8... done
-
Generation complete.
P.S.
You might need to reinstall the locales package afterwards:
-
sudo apt-get install --reinstall locales
-
export LANG= "de_DE.utf8"
-
YAY!