This thread is not a duplicate to locale not found/setting locale failed - what should I do? because
- the file
/etc/locale.genhas uncommented the lineen_US.UTF-8 UTF-8which should sufficient - no
localepurgeis installed
I get strange perl: warning: Setting locale failed in all Linux kernel things etc
masi@raspberrypi:~ $ sudo a2enmod rewrite && a2enmod headers && a2enmod ssl
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LC_PAPER = "en_US.UTF-8",
LC_ADDRESS = "en_US.UTF-8",
LC_MONETARY = "en_US.UTF-8",
LC_NUMERIC = "en_US.UTF-8",
LC_TELEPHONE = "en_US.UTF-8",
LC_IDENTIFICATION = "en_US.UTF-8",
LC_MEASUREMENT = "en_US.UTF-8",
LC_TIME = "en_US.UTF-8",
LC_NAME = "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").
Module rewrite already enabled
# https://unix.stackexchange.com/a/287622/16920
masi@raspberrypi:~ $ sudo deluser -remove-home pi
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = "en_US.UTF-8",
LC_PAPER = "fi_FI.UTF-8",
LC_ADDRESS = "fi_FI.UTF-8",
LC_MONETARY = "fi_FI.UTF-8",
LC_NUMERIC = "fi_FI.UTF-8",
LC_TELEPHONE = "fi_FI.UTF-8",
LC_IDENTIFICATION = "fi_FI.UTF-8",
LC_MEASUREMENT = "fi_FI.UTF-8",
LC_TIME = "fi_FI.UTF-8",
LC_NAME = "fi_FI.UTF-8",
LANG = "en_US.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
/usr/sbin/deluser: The user `pi' does not exist.
Solution
I had en_GB.UTF-8 UTF-8 only enabled in /etc/locale.gen. I should have there only enabled en_US.UTF-8 UTF-8 because of other commands run for it. So I uncommended GB and added US and everything work now
masi@raspberrypi:~ $ sudo vim /etc/locale.gen
masi@raspberrypi:~ $ sudo locale-gen
Generating locales (this might take a while)...
en_US.UTF-8... done
Generation complete.
masi@raspberrypi:~ $ sudo a2enmod rewrite && a2enmod headers && a2enmod ssl
Module rewrite already enabled
Module headers already enabled
Considering dependency setenvif for ssl:
Module setenvif already enabled
Considering dependency mime for ssl:
Module mime already enabled
Considering dependency socache_shmcb for ssl:
Module socache_shmcb already enabled
Module ssl already enabled
System: Raspbian Jessie
Hardware: Raspberry Pi 3 b