06.20.07

Error: locale error on Ubuntu

Posted in Error Messages, Intermediate, Linux at 2:20 pm by Techie

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.

Leave a Comment

Bad Behavior has blocked 312 access attempts in the last 7 days.