Ad_Feed

Tuesday, October 28, 2014

Perl warning Setting locale failed in Ubuntu

Perl Locale Warning.
The warnings could be irritating, especially when installing any application. The warnings are also visible when some commands are run

The warnings look like:
perl: warning: Falling back to the standard locale ("C").
locale: Cannot set LC_ALL to default locale: No such file or directory

 
and when you run Run locale from the commandline
bonkhi@sparda-coven:$ locale
locale: Cannot set LC_ALL to default locale: No such file or directory
LANG=en_US.UTF-8
LANGUAGE=
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC=en_NG.UTF-8
LC_TIME=en_NG.UTF-8
LC_COLLATE="en_US.UTF-8"
LC_MONETARY=en_NG.UTF-8
LC_MESSAGES="en_US.UTF-8"
LC_PAPER=en_NG.UTF-8
LC_NAME=en_NG.UTF-8
LC_ADDRESS=en_NG.UTF-8
LC_TELEPHONE=en_NG.UTF-8
LC_MEASUREMENT=en_NG.UTF-8
LC_IDENTIFICATION=en_NG.UTF-8
LC_ALL=

To solve this, generate the missing locale
locale-gen en_US.UTF-8

Set the missing locale
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

No comments:

Post a Comment