由于VPS的空间比较小,所以。。。偷懒装了一个debian,其实还有更小的,但我想debian相对会较小一点。。
在执行一些命令的时候会报这种错误 :
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LANG = "zh_CN.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
这个问题其实很简单,摆明了就是没设置本地环境变量嘛,不过,我也没有设置lang为zh_CN呀。这年头,还是en_US比较安全吧。
在ubuntu下面,可以通过:apt-get install language-pack-en-base 来解决,但debian下没有这个命令,所以只能:
export LANGUAGE=en_US.UTF-8
export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8
locale-gen en_US.UTF-8
dpkg-reconfigure locales
然后会出来一个界面,你在里面选择en_US.UTF-8,然后一切就都解决了。很方便

评论 (0)
暂无评论