Perl Locale is Corrupted after Gutsy Upgrade

At some point after I completed my Feisty to Gutsy upgrade I discovered that whenever I ran a perl module (whether it was when I was reinstalling vmware or running aptitude) I received the following warning:


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

I ran across the following ubuntu forum thread and executed the following two commands to clean up the broken locale:


sudo locale-gen
sudo dpkg-reconfigure locales

That resolved the issue and the perl warnings disappeared when I ran aptitude again as a smoke test. I am not sure what could have caused this corruption as the thread is dated. The issue might not be gutsy upgrade related but it is likely the culprit as I have done little on my machine in terms of config changes beyond it.

One Response to “Perl Locale is Corrupted after Gutsy Upgrade”

  1. Rhys Ulerich Says:

    Though the locale-gen/dpkg-reconfigure locales commands didn’t work for me, the route suggested by Marcelo at http://ubuntuforums.org/showpost.php?p=2090770&postcount=10 did.

Leave a Reply