我有一台远程运行的 Debian 机器,我尝试了很多方法来解决这个语言环境问题,apt-get
虽然在使用时没什么危害,但正因为如此,我的网络应用程序无法正常运行。我快速在 Google 上搜索了解决方案,发现dpkg-reconfigure locales
可以解决问题,但我仍然没有找到正确的方法。
idlecool@machine:~$ sudo dpkg-reconfigure locales
[sudo] password for idlecool:
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LANG = "en_IN"
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
/usr/bin/locale: Cannot set LC_CTYPE to default locale: No such file or directory
/usr/bin/locale: Cannot set LC_MESSAGES 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)...
Generation complete.
idlecool@machine:~$
答案1
您还可以尝试运行针对中配置的区域sudo locale-gen
设置运行。localedef
/etc/locales.gen
如果这没有帮助,请发布,/etc/locale.gen
因为看起来他会尝试设置以前未生成的语言环境。
答案2
嗯,你可以试试aptitude reinstall locales
。然后选择你需要的所有语言并检查locale
是否设置正确。