供自己查看:
1.ubuntu安装简体中文包
sudo apt-get -y install language-pack-zh-hans language-pack-zh-hans-base
2.查看是否安装 locale -a
可显示
zh_CN
zh_CN.gb2312
zh_CN.utf8
3.执行locale
出现问题:
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
可通过编译/root/.bashrc进行修改
sudo -s(可切换至root用户)
vi /root/.bashrc
最末添加下面信息
export LANGUAGE="zh_CN.UTF-8"
export LANG="en_US:zh_CN"
export LC_ALL="zh_CN.UTF-8"
保存后编译 source /root/.bashrc
再次执行locale
LANG=en_US:zh_CN
LANGUAGE=zh_CN.UTF-8
LC_CTYPE="zh_CN.UTF-8"
LC_NUMERIC="zh_CN.UTF-8"
LC_TIME="zh_CN.UTF-8"
LC_