I've been having troubles with locales recently. I've been having a problem with them since a long time ago, but didn't bother to fix (dumb me, maybe back then I was closer to solving this problem). Recently I've been trying to code a little bit in Perl, and after running the script an information popped up:
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = "en_US.UTF-8",
LC_CTYPE = "en_US.UTF-8",
LANG = "en_US.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
I've been trying to configure /etc/default/locale, adding lines, since I've lurked around other SO's threads:
LC_ALL="en_US.UTF-8"
LANG="en_US.UTF-8"
LANGUAGE="en_US.UTF-8"
To the file, and then running:
locale-gen en_US.UTF-8
But while running this command, I only receive:
Generating locales (this might take a while)....
pl_PL.UTF-8... done # (which is my native language)
Generation complete.
Then I've ran:
sudo dpkg-reconfigure locales
I've chosen en_US.UTF-8 locales to generate, rebooted, bam. Terminal is not opening up. I've changed the default language in settings to Polish, and terminal opened up, but upon starting it a warning popped up:
bash: warning: setlocale: LC_ALL: can't change locale (en_US.UTF-8): No file or directory
This error was printed in my native language by the way, but I've translated it. Most probably because of the language change.
locale -a
prints that:
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_COLLATE to default locale: No such file or directory
C
C.UTF-8
POSIX
pl_PL.utf8