
Estou com um problema para gerar os Locales no meu servidor (Debian 7.5 stable (Wheezy) (64bits)). Quando executo, como root:
dpkg-reconfigure locales
E select en_US.UTF-8
, recebo os seguintes logs:
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = "en_GB:en",
LC_ALL = (unset),
LC_CTYPE = "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_CTYPE to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
/usr/bin/locale: Cannot set LC_CTYPE to default locale: No such file or directory
/usr/bin/locale: Cannot set LC_ALL to default locale: No such file or directory
Generating locales (this might take a while)...
en_US.UTF-8... done
Generation complete.
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = "en_GB:en",
LC_ALL = (unset),
LC_CTYPE = "UTF-8",
LANG = "C"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = "en_GB:en",
LC_ALL = (unset),
LC_CTYPE = "UTF-8",
LANG = "C"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
sh: warning: setlocale: LC_CTYPE: cannot change locale (UTF-8)
Alguma ideia do porquê?
Obrigado!
Responder1
Aparentemente você tem LANGUAGE=en_GB:en
em seu ambiente, mas não selecionou en_GB
outras en
variações a serem geradas (a primeira parte do dpkg-reconfigure locales
).
Você provavelmente tinha en_GB
como padrão antigo, mas agora os removeu da lista de localidades a serem geradas. No entanto, seu ambiente ainda possui a configuração antiga, então o Perl está reclamando que não consegue encontrar o local (antigo). Isso não é um problema em si para pessoas que falam inglês, o local substituto é perfeitamente legível, portanto não é realmente um problema.
Sair e fazer login novamente selecionará as novas configurações; alternativamente, você pode fazer
source /etc/default/locale
da sua concha.
Certos aplicativos podem nem sempre ter a localização disponível para sua localidade específica; nesses casos, iniciar um aplicativo da seguinte maneira pode ajudar, pois a C
localidade deve estar sempre disponível:
env LC_ALL=C applicationname