玩linux时非常讨厌诸如以下的提示
[quote]perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:[/quote]
侦测问题时先测试
如果出现
[quote]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
LANG=en_US.UTF-8
LANGUAGE=en_US:en[/quote]
则说明en_US的语言包没装好,尝试
如果需要中文的locale
另外,服务器上最好使用英文语言
[quote]perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:[/quote]
侦测问题时先测试
locale
如果出现
[quote]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
LANG=en_US.UTF-8
LANGUAGE=en_US:en[/quote]
则说明en_US的语言包没装好,尝试
sudo apt-get install language-pack-en-base
sudo dpkg-reconfigure locales
如果需要中文的locale
locale-gen zh_CN.UTF-8
另外,服务器上最好使用英文语言
vim /etc/default/locale
LANG="en_US.UTF-8"
LANGUAGE="en_US:en"