Locale error on Ubuntu 11.04

Every time I install a fresh Ubuntu on my VPSes I get these errors :

perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LC_CTYPE = “en_US.UTF-8”,
LC_COLLATE = “en_US.UTF-8”,
LC_MESSAGES = “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”).
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

while running apt-get commands.

Here is how to fix them .. just run the 2 commands on your shell :
locale-gen en_US.UTF-8
update-locale

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.