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

3 Answers 3

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.

1
  • 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. Nov 26, 2017 at 9: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.

1
  • 1
    This case is probably specific to Kubuntu/KDE; see the suggested duplicate bug. Nov 25, 2017 at 15:37
-2

Try:sudo dpkg-reconfigure locales

5
  • Given that en_DE.UTF-8 does not exist in /usr/share/i18n/SUPPORTED, how would that help? Nov 26, 2017 at 3:59
  • I update my answer Nov 26, 2017 at 4:14
  • If this not solving your problem it seems that something has been removed Nov 26, 2017 at 4:17
  • No, you misunderstood me. The thing is that a locale name which does not exist in glibc is being set, so even if you regenerate the locales, no en_DE.UTF-8 locale will be created, and the error won't go away. (Excluding the -u option doesn't make a difference in this respect.) Nov 26, 2017 at 4:35
  • I see, i will search if i can find something useful to answer Nov 26, 2017 at 4:40

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.