每次执行ls -al总是提示“初始化月份字符串出错”,平时使用并不影响,但是看起来让人十分不爽。解决方法如下:
1.编辑 /var/lib/locales/supported.d/local 将文件内容修改如下:
en_US.UTF-8 UTF-8
zh_CN.UTF-8 UTF-8
zh_CN.GBK GBK
zh_CN GB2312
2.重新生成locale支持文件
sudo locale-gen
3.编辑/etc/default/locale 将文件内容修改如下:
LANG="zh_CN.UTF-8"
LANGUAGE="zh_CN:zh"
LC_NUMERIC="zh_CN.UTF-8"
LC_TIME="zh_CN.UTF-8"
LC_MONETARY="zh_CN.UTF-8"
LC_PAPER="zh_CN.UTF-8"
LC_NAME="zh_CN.UTF-8"
LC_ADDRESS="zh_CN.UTF-8"
LC_TELEPHONE="zh_CN.UTF-8"
LC_MEASUREMENT="zh_CN.UTF-8"
LC_IDENTIFICATION="zh_CN.UTF-8"
现在退出终端重新登陆就不会再报错了。