Various commands generate locale errors, e.g. sudo apt install mc (after, sudo apt update), sudo dpkg-reconfigure tzdata or I see these a lot when building software using the autotools
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LC_TIME = "en_GB.UTF-8",
LC_MONETARY = "en_GB.UTF-8",
LC_ADDRESS = "en_GB.UTF-8",
LC_TELEPHONE = "en_GB.UTF-8",
LC_NAME = "en_GB.UTF-8",
LC_MEASUREMENT = "en_GB.UTF-8",
LC_IDENTIFICATION = "en_GB.UTF-8",
LC_NUMERIC = "en_GB.UTF-8",
LC_PAPER = "en_GB.UTF-8",
LANG = "en_GB.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
Additional Information
I live in Spain, so perhaps the locale is set to British English based on my location.
Fix
Make sure the locale is included/uncommented in /etc/locale.gen and regenerate locales with sudo locale-gen
Issue still exists in the release version of Volumio 3
Here is an example on the command line
volumio@volumio3a:~$ sudo dpkg-reconfigure tzdata
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LC_ADDRESS = "en_GB.UTF-8",
LC_NAME = "en_GB.UTF-8",
LC_MONETARY = "en_GB.UTF-8",
LC_PAPER = "en_GB.UTF-8",
LC_IDENTIFICATION = "en_GB.UTF-8",
LC_TELEPHONE = "en_GB.UTF-8",
LC_MEASUREMENT = "en_GB.UTF-8",
LC_TIME = "en_GB.UTF-8",
LC_NUMERIC = "en_GB.UTF-8",
LANG = "en_GB.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
Current default time zone: 'Etc/UTC'
Local time is now: Thu Dec 9 20:13:49 UTC 2021.
Universal Time is now: Thu Dec 9 20:13:49 UTC 2021.
This happens only when using a terminal for some background work, which is not a typical Volumio use case.
I think the Volumio Team did/ does not see this as an urgent issue to resolve.
The warning is simply an annoyance in scrolling output, but in mc I found the big red “error” was covering the dialogue where I had to confirm/select some action on files. It is a new installation, so I didn’t care if I made the wrong choice, but there is definitely some potential for breaking a working installation!
Looking more at the source of the issue, I am logging in with ssh and having my current locale used, which is en_GB.UTF-8, and this then is not available on the Volumio machine, hence the warning.
There is some more information in the following thread
I think it would be helpful to mention this issue in the Volumio docs about logging in with ssh, and also say how to stop the warning being printed if this should occur. I don’t think any changes are needed to Volumio itself.
Thanks for the suggestion. That is the page I thought the extra information should go. However, it would be easier for the dev team to add some text, if they want to include it, rather than for me to submit a PR which may well be ignored.