davidfoerster/aptsources-cleanup

aptsources-cleanup locale: Cannot set LC_CTYPE to default locale: No such file or directory (KDE-neon git unstable)

Closed this issue · 5 comments

yeehi commented

After downloading and running the latest package, the following dialogue appeared:

https://paste.kde.org/pmkq7runu

How exactly did you run "the […] package"? Did you run the application from a ZIP bundle? Could you please add the output of the locale command to your issue description? Thanks.

yeehi commented

Hi David!
Thanks for your script. I navigated to the folder where the zip file was downloaded and ran the command:

sudo python3 -OEs aptsources-cleanup.zip

The locale command produces the following output:

https://paste.kde.org/pxvk3bwee

It looks like your system locale data may be corrupted or missing. Could you please run sudo locale-gen and then locale again and show me their output?

In any case I'll provide a patch to keep the application going and revert to English in case of bad locale settings or data. There's no need to fail in such cases.

yeehi commented
Generating locales (this might take a while)...
Generation complete.

locale
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_GB.UTF-8
LANGUAGE=
LC_CTYPE="en_GB.UTF-8"
LC_NUMERIC=en_GB.UTF-8
LC_TIME=en_GB.UTF-8
LC_COLLATE="en_GB.UTF-8"
LC_MONETARY=en_GB.UTF-8
LC_MESSAGES="en_GB.UTF-8"
LC_PAPER=en_GB.UTF-8
LC_NAME=en_GB.UTF-8
LC_ADDRESS=en_GB.UTF-8
LC_TELEPHONE=en_GB.UTF-8
LC_MEASUREMENT=en_GB.UTF-8
LC_IDENTIFICATION=en_GB.UTF-8
LC_ALL=

Fixed in 33d9b5e. You should be able to run the application despite the broken system locale now.

See

for possible ways to fix your locale.