locale not found/setting locale failed - what should I do?

It seems that no locale is generated. Have you selected pl_PL.UTF-8 properly in dpkg-reconfigure locales by pressing space in the corresponding line?

If yes, the line

pl_PL.UTF-8 UTF-8

in /etc/locale.gen is not commented (= does not start with #). If you need to fix this, you need also to run locale-gen to generate the locales. Its output should be:

Generating locales (this might take a while)...
   pl_PL.UTF-8... done
Generation complete.

If it does not output the locales you want to generate, there seems to be something wrong with your system. One reason could be that you have localepurge installed. If there are no files in /usr/share/locale/pl/LC_MESSAGES or /usr/share/locale/pl_PL/LC_MESSAGES this is the case or your system is broken.


first:

sudo apt-get purge locales

then:

sudo aptitude install locales

and the famous:

sudo dpkg-reconfigure locales

This rids the system of locales, then re-installs locales and downgrades libc6 from 2.19 to 2.13 which is the issue. Then configures locales again.


The quick and easy way (although it will mean more disk used than others):

apt install locales-all

Tags:

Locale

Debian