Perl warning Setting locale failed

Submitted by editor on Sat, 08/27/2016 - 09:37

I have following error message when installing perl package, how to resolve this probleme ?

perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
    LANGUAGE = "en_GB:en",
    LC_ALL = (unset),
    LC_PAPER = "fr_FR.UTF-8",
    LC_ADDRESS = "fr_FR.UTF-8",
    LC_MONETARY = "fr_FR.UTF-8",
    LC_NUMERIC = "fr_FR.UTF-8",
    LC_TELEPHONE = "fr_FR.UTF-8",
    LC_NAME = "fr_FR.UTF-8",
    LANG = "en_GB.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to a fallback locale ("en_GB.UTF-8").
locale: Cannot set LC_ALL to default locale: No such file or directory

For that, regenerate locals and setup locale settings.

Generate locals

Ex:# locale-gen en_US.UTF-8
Or :# locale-gen fr_FR.UTF-8

An also you can use # localedef -i en_US -f UTF-8 en_US.UTF-8

Setup local settings

export LANGUAGE=en_US.UTF-8
export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8
locale-gen en_US.UTF-8
dpkg-reconfigure locales

Note : The dpkg-reconfigure locales command will open a dialog under Debian for selecting the desired locale. This dialog will not appear under Ubuntu.

If you have a warning like:

update-locale: Warning: LANGUAGE (en_GB:en) is not compatible with LANG (C.UTF-8). Disabling it.

Solution : Select another language Ex : 'en_GB.UTF-8' as default system language (dpkg-reconfigure locale)

Add new comment

This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.
Enter the characters shown in the image.