Tuesday, August 18, 2009

Debian Linux 5.0.2 (Lenny) Locale Error after installation

As being a novice Debian user, I installed Debian Linux 5.0.2 (lenny) on my Vmware about 4 times today thinking that its a temporary CRC checksum / hash error.

But its bugged. It happens. Eventually worked my through it in the simple way:

Error it gives:
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

or

perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = "en_US:en_GB:en",
LC_ALL =
LANG = "en_US"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").

This generally means that the package "locale" has not been loaded. If you try to install it with apt-get install locale, it points directly to the installation CD which is the first DVD usually. But there is a hash error on installation package so it fails.

Workaround is very simple:
Although it looks like there is a faulty installation, there is no installation made. So, what it means is generally, locales package has not been installed.

  1. Remove the DVD from drive and run command apt-get install locale it will prompt for the DVD.

  2. Do NOT place the DVD inside and press enter. It will not find it, and it will eventually start downloading it from the website automatically.

    If it does not load it automatically you will have to write apt-get update, then re-run apt-get install locale

  3. dpkg-reconfigure locales

  4. in the process select the locales you would like to use and tadaaa there it is.

No comments:

Post a Comment