In the last couple of days my locales have a serious issue. I normally am "en_GB.UTF-8". Suddenly when running apt, error messages are appearing saying
Traceback (most recent call last): File "/usr/bin/apt-listchanges", line 33, in <module> from ALChacks import * File "/usr/share/apt-listchanges/ALChacks.py", line 32, in <module> sys.stderr.write(_("Can't set locale; make sure $LC_* and $LANG are correct!\n")) NameError: name '_' is not defined perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LANGUAGE = (unset), LC_ALL = (unset), LC_TIME = "en_gb", LC_MONETARY = "en_gb", LC_MEASUREMENT = "en_gb", LC_NUMERIC = "en_gb", LANG = "en_US.utf8" are supported and installed on your system. perl: warning: Falling back to the standard locale ("C"). 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 Gtk-WARNING **: Locale not supported by C library. Using the fallback 'C' locale. at /usr/share/perl5/Debconf/FrontEnd /Gnome.pm line 97, <> line 1.
Also if I try to run "gnome-control-center region" it either segfaults or the GUI appears, but if I try to set anything, it segfaults. Notice the "en_gb"s in the error message - a lower-case "GB" is illegal. Also I don't think en_US even exists as a locale on my system. When I login a dialog asks me if I want to rename directories as "my language has changed" - a bit disturbing. I think it started after an update, but I did try to install gnome-shell 3.2 from sid (because I mistakenly believed it would be easy to fulfil its dependencies, & wanted to use gnome extensions). I rolled it back, but could that have bent something out of shape? If so what should I reinstall?
Output of /usr/bin/locale:
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 LANG=en_US.utf8 LANGUAGE= LC_CTYPE="en_US.utf8" LC_NUMERIC=en_gb LC_TIME=en_gb LC_COLLATE="en_US.utf8" LC_MONETARY=en_gb LC_MESSAGES="en_US.utf8" LC_PAPER="en_US.utf8" LC_NAME="en_US.utf8" LC_ADDRESS="en_US.utf8" LC_TELEPHONE="en_US.utf8" LC_MEASUREMENT=en_gb LC_IDENTIFICATION="en_US.utf8" LC_ALL=
Output of locale -a:
C C.UTF-8 en_GB en_GB.iso88591 en_GB.utf8 POSIX