1

I've been experiencing some locale issues lately. I first noticed it when trying to run calibre from the terminal.

Running calibre returned:

WARNING: Failed to set default libc locale, using en_US.UTF-8

Then I ran locale which gave:

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_DE.UTF-8
LANGUAGE=
LC_CTYPE="en_DE.UTF-8"
LC_NUMERIC=de_DE.UTF-8
LC_TIME=en_NZ.UTF-8
LC_COLLATE="en_DE.UTF-8"
LC_MONETARY=de_DE.UTF-8
LC_MESSAGES="en_DE.UTF-8"
LC_PAPER=de_DE.UTF-8
LC_NAME=de_DE.UTF-8
LC_ADDRESS=de_DE.UTF-8
LC_TELEPHONE=de_DE.UTF-8
LC_MEASUREMENT=de_DE.UTF-8
LC_IDENTIFICATION=de_DE.UTF-8
LC_ALL=

After some research I found that the file /etc/environment might need something added to it, but I got confused because its content seems not related at all:

PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games"

How can I fix this issue? I am running Kubuntu 17.10.

EDIT: I found the file /etc/default/locale which contains the more promissing :

    #  File generated by update-locale
LANG=en_US.UTF-8
LC_NUMERIC="de_DE.UTF-8"
LC_TIME="de_DE.UTF-8"
LC_MONETARY="de_DE.UTF-8"
LC_PAPER="de_DE.UTF-8"
LC_NAME="de_DE.UTF-8"
LC_ADDRESS="de_DE.UTF-8"
LC_TELEPHONE="de_DE.UTF-8"
LC_MEASUREMENT="de_DE.UTF-8"
LC_IDENTIFICATION="de_DE.UTF-8"

Is this how it should look?

3 Answers3

1

In a comment I pointed you to What is the thing in KDE that override my locale settings, but you let us know that the file ~/.kde/env/setlocale.sh is not present on your machine.

I still think this problem is related to Kubuntu/KDE somehow. The locale output includes the locale name en_DE.UTF-8, which does not exist, and that's the reason for the error message.

So I'd advise you to go to Kubuntu's language settings GUI. Probably you have stated English as language and Germany as country, which unfortunately leads Kubuntu to set this non-existing locale. Try for instance to change the country to Denmark, and then relogin. Hopefully that will set the locale en_DK.UTF-8 (which exists) instead.

The issue has been reported as bug #1322968.

Gunnar Hjalmarsson
  • 33,540
  • 3
  • 64
  • 94
  • Brilliant! That did the trick. In the KDE "Formats" GUI I seelcted 'Germany-English (en_DE)'. I corrected it to 'Deutschland-Deutsch (de_DE)' and after reboot everything resolved. Thanks very much. – Douglas James Bock Nov 26 '17 at 09:10
0

Have you seen this thread? How do I fix my locale issue? This helps me on some of the missing locales see if this works for you.

Yien
  • 224
-2

Try:sudo dpkg-reconfigure locales