How to solve “Falling back to the standard locale” in ubuntu

Falling back standard locale

Sometimes you can get a error like this:

perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LC_PAPER = “pt_BR.UTF-8”,
LC_ADDRESS = “pt_BR.UTF-8”,
LC_MONETARY = “pt_BR.UTF-8”,
LC_NUMERIC = “pt_BR.UTF-8”,
LC_TELEPHONE = “pt_BR.UTF-8”,
LC_IDENTIFICATION = “pt_BR.UTF-8”,
LC_MEASUREMENT = “pt_BR.UTF-8”,
LC_TIME = “pt_BR.UTF-8”,
LC_NAME = “pt_BR.UTF-8”,
LANG = “en_US.UTF-8”
are supported and installed on your system.
perl: warning: Falling back to the standard locale (“C”).

Press continue reading to understand how to fix this!

To solve it, first run locale to list what locales you are supposed to have

$ locale
LANG=C
LANGUAGE=
LC_CTYPE=pt_BR.UTF-8
LC_NUMERIC=”C”
LC_TIME=”C”
LC_COLLATE=pt_BR.UTF-8
LC_MONETARY=”C”
LC_MESSAGES=pt_BR.UTF-8
LC_PAPER=”C”
LC_NAME=”C”
LC_ADDRESS=”C”
LC_TELEPHONE=”C”
LC_MEASUREMENT=”C”
LC_IDENTIFICATION=”C”
LC_ALL=

Then generate the missing locale and reconfigure locales:

$ sudo locale-gen pt_BR.UTF-8
Generating locales…
pt_BR.UTF-8… done
Generation complete.

$ sudo dpkg-reconfigure locales
Generating locales…
en_US.UTF-8… done
pt_BR.UTF-8… up-to-date
Generation complete.

Problem solved :-)

Source: askubuntu

Comments

comments

Comments are Disabled