Perl: warning: Setting locale failed

Prerequisites

Volumio Information

Volumio Version:

RETTY_NAME="Raspbian GNU/Linux 8 (jessie)"
NAME="Raspbian GNU/Linux"
VERSION_ID="8"
VERSION="8 (jessie)"
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"
VOLUMIO_BUILD_VERSION="168ba7444df98cd868db72f24faec0b6346489cc"
VOLUMIO_FE_VERSION="847a48ecf32d35cc502a0053d585d1a69236e391"
VOLUMIO_BE_VERSION="03f7bbd984817e093cac62b7ff876f3c2cfabc1d"
VOLUMIO_ARCH="arm"
VOLUMIO_VARIANT="volumio"
VOLUMIO_TEST="FALSE"
VOLUMIO_BUILD_DATE="Tue Dec 22 14:39:52 CET 2020"

VOLUMIO_VERSION="2.861"
VOLUMIO_HARDWARE="pi"
VOLUMIO_HASH="097e28ee6263e31d0bf6b690a02dcab3"

Steps to Reproduce

  1. Install. Choose English language
  2. Enable SSH and log in
  3. 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

Adrian.