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?
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 nameen_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.
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.
Try:
sudo dpkg-reconfigure locales