1

I'm having massive problems with Debian's locale Settings.

I want my server to talk to me in standard English (en_US.UTF-8?) and additionally have de_DE.UTF-8 available for a few Python scripts that require it. I fudged around with pretty much all combinations of locale-gen, dpkg-reconfigure locales and editing of config files.

Now, when logging into my server, I'm greeted with this:

Last login: Fri Mar 13 22:23:14 2015 from 1.2.3.4
-bash: warning: setlocale: LC_ALL: cannot change locale (de_DE.UTF-8)
-bash: warning: setlocale: LC_ALL: cannot change locale (de_DE.UTF-8)

What does this even mean?

On my other server, I somehow managed to configure everything correctly, and locale -a correctly outputs the following there:

C
C.UTF-8
de_DE.utf8
en_US.utf8
POSIX

On this server, however, I only get this at the moment:

C
C.UTF-8
POSIX
en_US.utf8

How do I fix this?

1

2 Answers 2

2

Turns out that locale-gen refused to generate a de_DE locale because it was commented out in /etc/locale.gen.

locale.gen

As you can see here, I've uncommented the locales I want. After a quick locale-gen, everything worked again.

0
1

The way I adjust this on Ubuntu is to open the locale file like this; using nano in this example but feel free to use whatever editor you prefer:

sudo nano /etc/default/locale

And then add—or edit—the LANG value like this:

LANG="en_US.UTF-8"

More info & details can be found in this answer on “Ask Ubuntu.”

1
  • That fixed the warnings on login, but I still need the de_DE locale.
    – emmalyx
    Commented Mar 14, 2015 at 11:06

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .