After recent updates, I started getting errors like the following:
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
This occurred on both Dapper Drake as well as Feisty Fawn versions of Ubuntu. It was really annoying to see this whenever running apt-get. Fortunately, the solution is pretty simple. As noted above, this is a locale error, so the trick here is to install the language pack for my language. In this case, that would be English, so I ran the following:
sudo apt-get install language-pack-en
This added a dependency for language-pack-en-base, but after installation, the error went away.