I get this problem a lot.
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LANG = "en_AU.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
I think possibly this solves it.
$ sudo apt-get install --reinstall language-pack-en
It says comforting things like...
Generating locales...
en_AU.UTF-8... done
en_BW.UTF-8... done
Update: Except it didn't work. But maybe this will.
$ sudo localedef -i en_AU -f UTF8 en_AU.utf8
Hi,
I solved this problem like this:
apt-get install locales
and then
dpkg-reconfigure locales
in the dialog window I selected US_en.UTF8 (or something similar) and no problems now.
hrasko / 11:22pm / 18 September 2008
Thanks!
This has solved an extremely annoying problem that was REALLY getting on my nerves.
Thanks again, and bookmarked for future reference.
Scott / 11:44pm / 11 November 2008
Solved! Thanks my friend; I’m now free from annoying bugs whenever I apt-get anything!
Jon Chase / 3:43am / 22 November 2008
this worked perfectly! thanks.
jayesh / 12:45am / 12 June 2009
This works. The only bad thing, this changes date settings or labguage.
If you want correct date settings you get wrong language or vice versa.
There need to be correct solution.
J / 7:41am / 6 December 2010
Adding a dash like:
sudo localedef -i en_US -f UTF-8 en_US.utf8
worked for me!
Ken / 7:14am / 19 January 2011
My underscore just started/stopped italics. The main difference is UTF-8 in place of UTF8. Trying inside quotes:
“sudo localedef -i en_US -f UTF-8 en_US.utf8”
Ken / 7:20am / 19 January 2011
[…] 看ç€å¤Ÿçƒ¦äººçš„,网上æœäº†ä¸€ä¸‹ç½—列了ä¸å°‘解决办法,è¦ä¹ˆå¤ªéº»çƒ¦ï¼Œè¦ä¹ˆæ ¹æœ¬æ²¡ç”¨ï¼Œèµ°äº†ä¸å°‘弯路。下é¢è¯´è¯´æˆ‘的解决办法(其实也是googleæ¥çš„:http://fatvegan.com/2008/08/14/cannot-set-lc_ctype/) […]
Leng Chuan Yu's Blog » Blog Archive » perl: warning: Setting locale failed.的报错解决 / 2:37pm / 11 February 2011
hi,
I tried what you suggested but I got this:
warning: setlocale: LC_ALL: cannot change locale (en_US)
Aly Badawy / 8:57am / 13 August 2011
Mmm. Sorry folks. Markdown not so great for everything.
Ryan / 5:20pm / 13 August 2011
If you are using ssh to connect to server.. maybe from your macbook like me? Then set the env var on the client your connecting from.
Joey / 12:56am / 27 December 2011