Tony Narlock Living life in the cloud

5Mar/100

Troubleshooting locales in the cloud on debian and ubuntu

If you use Amazon EC2 or Rackspace Cloud Servers, you may end up running into this after your create your instance. I often get these on Debian and Ubuntu (since it's debian based also).

lennycloud:~# perl
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").

You're missing locales.

Update your apt database. sudo apt-get update

Download locales. sudo apt-get install locales

Now configure it, and download what locales you need. dpkg-reconfigure locales on Debian. sudo locale-gen en_US.UTF-8 on Ubuntu Hardy Heron 8.04 (Note: on server, you may be logged in as root).

I pick en_US ISO-8859-1, en_US.ISO-8859-15 ISO-8859-15 and en_US.UTF-8 UTF-8.

And that solves it.

Updated April 03, 2010 to include locale-gen.