Error: locale error on Ubuntu

Posted on Wednesday 20 June 2007

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.

No comments have been added to this post yet.

Leave a comment

(required)

(required)


Information for comment users
Line and paragraph breaks are implemented automatically. Your e-mail address is never displayed. Please consider what you're posting.

Use the buttons below to customise your comment.


RSS feed for comments on this post | TrackBack URI