Oct 17 2016

How to fix Perl warning setting locale failed on Raspbian

perl: warning: Setting locale failed.

perl: warning: Please check that your locale settings:

LANGUAGE = (unset),

LC_ALL = (unset),

LC_CTYPE = “UTF-8”,

LANG = “en_GB.UTF-8”

are supported and installed on your system.

perl: warning: Falling back to a fallback locale (“en_GB.UTF-8”).

locale: Cannot set LC_CTYPE to default locale: No such file or directory

locale: Cannot set LC_ALL to default locale: No such file or directory

 

Perform the below command:

 

pi@raspberrypi:~ $ export LC_ALL=en_GB.UTF-8

pi@raspberrypi:~ $ export LANGUAGE=en_GB.UTF-8

pi@raspberrypi:~ $ export LANG=en_GB.UTF-8

pi@raspberrypi:~ $ export LC_ALL=en_GB.UTF-8

 

pi@raspberrypi:~ $ sudo locale-gen en_GB.UTF-8

Generating locales (this might take a while)…

en_GB.UTF-8… done

Generation complete.

 

pi@raspberrypi:~ $ sudo dpkg-reconfigure locales

Generating locales (this might take a while)…

en_GB.UTF-8… done

Generation complete.

Leave a Reply

Your email address will not be published.