Reaching out to others! Free & Open Source Software, Kannada, L10n, L18n Data Science, Cloud Computing & more…

Many package installations fail with the following errors. Especially the ones which involve databases etc. I found this following error while getting postgres SQL work.

perl: warning: Setting failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LANG = “.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

or you might even this error

Error: The locale requested by the environment is invalid.

This can be easily sorted out by running following command to generate the required locales.

You can even specify the locale with this command to generated the correct locale required for installations as follows:

locale-gen

Here is how I generated en_US locale:

~# locale-gen en_US
Generating locales…
en_US.ISO-8859-1… done
Generation complete.

Enjoy!

Tags: , , , , ,