Debian-Lenny

如何修復 debian lenny 中的語言環境設置(最小)

  • November 5, 2010

我有一台遠端執行的 debian 機器,我嘗試了很多方法來解決這個語言環境問題,apt-get雖然在使用時它是無害的,但因為它我的網路應用程序無法正常執行。我快速搜尋了解決方案,發現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:~$ 

您也可以嘗試執行sudo locale-gen以執行localedef在 中配置的語言環境/etc/locales.gen

如果這沒有幫助,請發布,/etc/locale.gen因為他似乎會嘗試設置以前未生成的語言環境。

嗯,你可以試試aptitude reinstall locales。然後選擇您需要的所有語言並檢查locale它是否設置正確。

引用自:https://serverfault.com/questions/198599