When I run perl
, I get the warning:
perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LANGUAGE = (unset
With zsh ohmyzsh I added this to the .zshrc
:
# You may need to manually set your language environment
LANGUAGE=en_US.UTF-8
LANG=en_US.UTF-8
LC_CTYPE=en_US.UTF-8
LC_ALL=en_US.UTF-8
By removing the line export LANG=en_US.UTF-8
Reopened a new tab and SSHed in, worked for me :)
on Debian after much searching this did the trick.
first:
sudo apt-get purge locales
then:
sudo aptitude install locales
and the famous:
sudo dpkg-reconfigure locales
This rids the system of locales, then re-installs locales and downgrades libc6 from 2.19 to 2.13 which is the issue. Then configures locales again.
All the previous answers are wrong. The message is clear - missing locale. The solution is to add the appropriate locale. You do that by editing the /etc/locale.gen file, remove the # sign in front of the locale being reported as missing and then issuing the command:
$ sudo locale-gen
This will actually generate the locales specified in /etc/locale.gen and therefore the message will not be shown.
For Ubuntu use this,
#export LANGUAGE=en_US.UTF-8
#export LC_ALL=en_US.UTF-8
#export LANG=en_US.UTF-8
#export LC_TYPE=en_US.UTF-8
Worked for me.
perl: warning: Falling back to the standard locale ("C").
locale: Cannot set LC_ALL to default locale: No such file or directory
Solution:
Try this (uk_UA.UTF-8 is my current locale. Write your locale, for example en_US.UTF-8 !)
sudo locale-gen uk_UA.UTF-8
and this.
sudo dpkg-reconfigure locales
Add LC_ALL="en_GB.utf8"
to /etc/environment
and reboot. That's all.