This thread is not a duplicate to locale not found/setting locale failed - what should I do? becausethe file /etc/locale.gen has uncommented the line en_US.UTF-8 UTF-8 which should sufficient no localepurge is installedI get strange perl: warning: Setting locale failed in all Linux kernel things etcmasi@raspberrypi:~ $ sudo a2enmod rewrite && a2enmod headers && a2enmod sslperl: 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/16920masi@raspberrypi:~ $ sudo deluser -remove-home piperl: 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.SolutionI 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 nowmasi@raspberrypi:~ $ sudo vim /etc/locale.genmasi@raspberrypi:~ $ sudo locale-gen Generating locales (this might take a while)...  en_US.UTF-8... doneGeneration complete.masi@raspberrypi:~ $ sudo a2enmod rewrite && a2enmod headers && a2enmod sslModule rewrite already enabledModule headers already enabledConsidering dependency setenvif for ssl:Module setenvif already enabledConsidering dependency mime for ssl:Module mime already enabledConsidering dependency socache_shmcb for ssl:Module socache_shmcb already enabledModule ssl already enabledSystem: Raspbian JessieHardware: Raspberry Pi 3 b
Why does perl complain about locales?
debian;raspberry pi;raspbian;locale