Problem setting locale

I am getting the following errors

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

when I attempt to fix it with dpkg-reconfigure locales

i get these errors

Generating locales (this might take a while)...
  en_GB.UTF-8...[error] cannot open locale definition file `en_GB': No such file or directory
 done
  en_US.UTF-8...[error] cannot open locale definition file `en_GB': No such file or directory
 done
Generation complete.

locale -a

C
C.UTF-8
POSIX

cat /etc/default/locale

LC_CTYPE="en_US.UTF-8"
LC_ALL="en_US.UTF-8"
LANG=en_US.UTF-8

uname -a

Linux parrot 5.4.0-4parrot1-amd64 #1 SMP Parrot 5.4.19-4parrot1 (2020-02-27) x86_64 GNU/Linux

Debian Standard install

Configured to multiboot with other systems? NO

If there are any similar issues or solutions, link to them below:

If there are any error messages or relevant logs, post them below:

sudo dpkg-reconfigure locales

perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
        LANGUAGE = (unset),
        LC_ALL = "en_US",
        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").
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
/usr/bin/locale: Cannot set LC_CTYPE to default locale: No such file or directory
/usr/bin/locale: Cannot set LC_MESSAGES to default locale: No such file or directory
/usr/bin/locale: Cannot set LC_ALL to default locale: No such file or directory
Generating locales (this might take a while)...
  en_GB.ISO-8859-1...[error] cannot open locale definition file `en_GB': No such file or directory
 done
  en_GB.UTF-8...[error] cannot open locale definition file `en_GB': No such file or directory
 done
  en_US.ISO-8859-1...[error] cannot open locale definition file `en_GB': No such file or directory
 done
  en_US.UTF-8...[error] cannot open locale definition file `en_GB': No such file or directory
 done
Generation complete.
*** update-locale: Error: invalid locale settings:  LC_CTYPE="en_US.UTF-8" LANG=C.UTF-8 LC_ALL="en_US.UTF-8"

Welcome to the ParrotOS Community :hugs:
try
sudo locale-gen en_US.UTF-8
sudo dpkg-reconfigure locales

If you want to use a different language just replace the language code en_US to your desired language code.
example:- zh_CN ,de_DE ,fr_FR ,etc

It works now, not sure why. probably an update.

thanks

it is a bug in new packages. We are tracking it and trying to fix it in next release. Close this topic because it is duplicated and owner fixed the problem.

This topic was automatically closed 60 minutes after the last reply. New replies are no longer allowed.