
내 서버(Debian 7.5 stable(Wheezy)(64bits))에서 로케일을 생성하는 데 문제가 있습니다. 내가 실행할 때 루트로 :
dpkg-reconfigure locales
을 선택하면 en_US.UTF-8
다음 로그가 표시됩니다.
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)
왜 그런지 아시나요?
감사합니다!
답변1
분명히 귀하의 환경에는 있지만 생성할 다른 변형(의 첫 번째 부분)을 LANGUAGE=en_GB:en
선택하지 않았습니다 .en_GB
en
dpkg-reconfigure locales
이전 기본값을 사용했지만 en_GB
이제 생성할 로케일 목록에서 이를 제거했습니다. 그러나 환경에는 여전히 이전 설정이 있으므로 Perl은 (이전) 로케일을 찾을 수 없다고 불평합니다. 영어를 사용하는 사람들에게는 그 자체로는 문제가 되지 않습니다. 대체 로케일은 완벽하게 읽을 수 있으므로 실제로 문제가 되지 않습니다.
로그아웃했다가 다시 로그인하면 새로운 설정이 적용됩니다. 또는 다음을 수행할 수도 있습니다.
source /etc/default/locale
당신의 껍질에서.
특정 애플리케이션에는 특정 로케일에 대한 현지화가 항상 제공되지 않을 수도 있습니다. 그러한 경우에는 C
로케일이 항상 사용 가능해야 하므로 다음과 같은 응용 프로그램을 시작하는 것이 도움이 될 수 있습니다 .
env LC_ALL=C applicationname