How To Fix Raspbian Locale Issue

configure and fix Raspbian locale issue

January 25, 2017 - 5 minutes read -

I hope you have already setup your Raspberry Pi and made it running successfully. If not and you are also interested in this cool Pi, please review how to active your Raspberry Pi.

For me, I have installed Raspberry Pi with official supported OS: Raspbian, and it is running well, except throwing locale setting incorrect warnings. Here is the warning messages shown on my terminal once running any commands through SSH:

perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
	LANGUAGE = (unset),
	LC_ALL = (unset),
	LC_CTYPE = "zh_CN.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").

And here is the solution to fix this annoying issue:

  • Run command: sudo raspi-config
  • You will see the following screes and select the related option to configure your locale config locale change locale select locale
  • Edit the file /etc/default/locale and put the followings into it
  • Restart your Raspberry Pi

Share this by: