1

I change the systems locale settings to en_US.UTF-8 with dpkg-reconfigure locales. The locale command outputs:

LANG=en_US.UTF-8
LANGUAGE=
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=

In /etc/default/locale I have the following content:

LANG=en_US.UTF-8

Also, /etc/locale.gen does contain only en_US.UTF-8 UTF-8.

Running unattended-upgrades every morning from /etc/cron.daily/apt-compat produces the following errors in my syslog:

apt.systemd.daily[3829]: --- Logging error ---
apt.systemd.daily[3829]: Traceback (most recent call last):
apt.systemd.daily[3829]:   File "/usr/lib/python3.5/logging/__init__.py", line 983, in emit
apt.systemd.daily[3829]:     stream.write(msg)
apt.systemd.daily[3829]: UnicodeEncodeError: 'ascii' codec can't encode character '\xfc' in position 43: ordinal not in range(128)
apt.systemd.daily[3829]: Call stack:
apt.systemd.daily[3829]:   File "/usr/bin/unattended-upgrade", line 1538, in <module>
apt.systemd.daily[3829]:     main(options)
apt.systemd.daily[3829]:   File "/usr/bin/unattended-upgrade", line 1219, in main
apt.systemd.daily[3829]:     logging.info(_("Allowed origins are: %s"), allowed_origins)
apt.systemd.daily[3829]: Message: 'erlaubte Urspr\xfcnge sind: %s'
apt.systemd.daily[3829]: Arguments: (['origin=Debian,codename=stretch,label=Debian-Security'],)

The system tried to translate Allowed origins are: %s to the german version erlaubte Ursprünge sind: %s, which contains a special char ü. After some research I found out, that the file with the translations is found here: /usr/share/locale/de/LC_MESSAGES/unattended-upgrades.mo.

Why does apt / unattended-upgrades tries to translate english to german, as I have changed the locales already to the correct english values? How can I stop this behaviour?

2

Solved the problem by issuing the following commands again:

dpkg-reconfigure locales
localectl set-locale LANG=en_US.UTF-8 LANGUAGE=en_US:en

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.