Locale problems


I got my CHIP yesterday, and had lots of fun trying to figure out how to set it up with a mouse but no keyboard. Eventually using my USB cable I got terminal access via my laptop and was able to set it up for SSH. Unfortunatly I noticed lots of errors as I used it. Mostly having to do with locale.

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

There were many versions of this, but the common theme seemed to be the last three lines.

I tried using

locale-gen en_US en_US.UTF-8
dpkg-reconfigure locales

and then rebooting, but now the chip isn’t booting anymore! The lights go on, but nothing shows up on the TV and I can’t SSH in anymore. What did I do wrong? Did I brick it? How do I reflash this?

Okay the not booting was an overheating issue, and the locale seems to have been fixed. Leaving this here for anybody else with the same problem.


I needed to perform:

sudo apt-get update
sudo apt-get install locales

Before I could run locale-gen.


I also needed to run:

sudo dpkg-reconfigure tzdata

to set the time zone.


Please note that there is a typo here. It should be: sudo apt-get install locales

To sum up:

sudo apt-get update
sudo apt-get install locales

Then you can either simply run:
sudo locale-gen

sudo locale-gen en_US en_US.UTF-8

I ran locale-gen, without the extra parameters, so I could see all of the possible locales.


Thanks, I always do that (leave off the install)!


The procedure to generate locales may be found in our documentation.


I’m still having this problem, despite having set my locales over and over again. Is there any other fix?


I don’t know what you’ve tried, but this is the script I wrote to fix locales for a newly flashed chip. This is edited for central US time zone, but you can modify it to suite your needs. Hope it helps.

#! /bin/bash
/usr/bin/apt-get update
/usr/bin/apt-get install locales
/bin/echo Generating Locale...
/usr/sbin/locale-gen en_US en_US.UTF-8
/bin/echo Calling dpkg for locales...
/usr/sbin/dpkg-reconfigure locales
/bin/echo Setting timezone file to US Central...
/bin/echo "US/Central" > /etc/timezone
/bin/echo Calling dpkg for tzdata...
/usr/sbin/dpkg-reconfigure -f noninteractive tzdata
/bin/echo Done.
  • JCN


Make sure you run that script as “root”, of course…