I have a problem with a slightly customised Debian image that I'm trying to do some headless work on. The problem is that the installed locales list has been reduced to this:
C
en_GB
en_GB.iso88591
en_GB.iso885915
en_GB.utf8
POSIX
However, when I log in as root (with an otherwise as-vanilla profile), I find this:
~# set | grep LC_
LC_CTYPE=en_US.UTF-8
That's the only LC_ environment variable set, and presumably that means that it's being explicitly set somewhere (and given that /etc/default/locale only contains LANG=en_GB, I can't see any other alternative). However, I can't see where it is being set, and the fact that it's wrong is preventing, for example, postgresql-8.4 from installing. I know I can do an
LC_CTYPE=en_GB apt-get install postgresql-8.4
to work around this, but I'd really like to understand where this setting comes from, and I really dislike the idea of installing an otherwise-unnecessary locale to make this go away. So: where does this LC_CTYPE setting come from, and how do I make it go away?
/etc/environment; it's where it used to be set. other options are/etc/bash.bashrcand/etc/profile.d/something.sh, but nothing should have automatically installed the variable in those files. – Michael Lowman Jul 21 '11 at 14:48locale-gen, right? – Michael Lowman Jul 21 '11 at 14:49locale-genhas been run, there's nothing in/etc/environment(empty file). I can't see anything relevant in/etc/bash.bashrc, and the only thing in/etc/profile.disbash_completion.shwhich, from an eyeball scan and agrep LC_, looks irrelevant. – regularfry Jul 21 '11 at 15:07bash --noprofile --norc. if this doesn't pick up theLC_CTYPE, your issue must be in one of those startup files – Michael Lowman Jul 21 '11 at 16:17bash --loginorbash --noprofile --norc. I can runLC_CTYPE=FOO bash <whatever>and LC_CTYPE is set to FOO inside the new shell in both cases. – regularfry Jul 21 '11 at 16:47