Personal tools
You are here: Home Docs Perl

Perl

Fix locales issue for Perl

The error looks something like this:

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

run these two commands to fix:
(note: adapt the language codes to your language)

locale-gen en_US en_US.UTF-8
dpkg-reconfigure locales
Document Actions