After setting up a Gnu/Linux Server, Computer or a Docker image, you can get a locale error.
It is because your OS have no default locale and the error output can be like this one:
perl: warning: Setting locale failed.perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LC_PAPER = "az_AZ.UTF-8",
LC_ADDRESS = "az_AZ.UTF-8",
LC_MONETARY = "az_AZ.UTF-8",
LC_NUMERIC = "az_AZ.UTF-8",
LC_TELEPHONE = "az_AZ.UTF-8",
LC_IDENTIFICATION = "az_AZ.UTF-8",
LC_MEASUREMENT = "az_AZ.UTF-8",
LC_TIME = "az_AZ.UTF-8",
LC_NAME = "az_AZ.UTF-8",
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_ALL to default locale: No such file or directory
To solve this issue you can add a default locale to the
Some times you also need to add this lines to the
Or, better way to solve the issue, connect to your server, in colsole run the following command to get the list of locales on your server:
And generate the missing locale:
Then reconfigure locales:
sudo dpkg-reconfigure locales
For Docker images, add these lines to your
RUN export LC_ALL=en_US.UTF-8Share on Twitter Share on Facebook
RUN export LANG=en_US.UTF-8
RUN locale-gen en_US.UTF-8