"Failed to set locale" message

Hello FreedomBox community,

when running apt upgrade via ssh I get the following message:

[…]
Failed to set locale. Fix your system.
Failed to set locale. Fix your system.
quota not working (qgroup not set)
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
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
[…]
Failed to set locale. Fix your system.
Failed to set locale. Fix your system.
Config is in use.

Using rolling (testing) release, FreedomBox v. 19.2

How should I fix this?

Thanks!

Try running “sudo dpkg-reconfigure locales”, and select at least one locale from the list.

I think I did this at some point on my box.

1 Like

In addition to “sudo dpkg-reconfigure locales” I had to first install the locales package via “sudo apt install locales”. Then I could select my prefered locale and add it as my default locale.

1 Like

Could (should?) this not be auto-configured when the user selects their timezone in Plinth?