当前位置: 技术问答>linux和unix
解决linux下查看日志中文乱码
来源: 互联网 发布时间:2017-01-29
本文导语: 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 LANG=en_us LC_CTYPE="en_us" LC_NUMERI...
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
LANG=en_us
LC_CTYPE="en_us"
LC_NUMERIC="en_us"
LC_TIME="en_us"
LC_COLLATE="en_us"
LC_MONETARY="en_us"
LC_MESSAGES="en_us"
LC_PAPER="en_us"
LC_NAME="en_us"
LC_ADDRESS="en_us"
LC_TELEPHONE="en_us"
LC_MEASUREMENT="en_us"
LC_IDENTIFICATION="en_us"
LC_ALL=
zh_CN
zh_CN.gb18030
zh_CN.gbk
zh_CN.utf8
zh_HK
zh_HK.utf8
zh_SG
zh_SG.gbk
zh_SG.utf8
zh_TW
zh_TW.euctw
zh_TW.utf8
zu_ZA
zu_ZA.utf8
......
export LANG=zh_CN.utf8
设置完成,
之后我ssh登陆到服务器出现
/usr/bin/manpath: can't set the locale; make sure $LC_* and $LANG are correct
这难道是我 LANG的值 设置不支持吗?
麻烦各位解答, thanks!
|
echo "LC_ALL="zh_CN.gb2312"" >> /etc/profile
echo "export LC_ALL" >> /etc/profile
然后给你的终端程序,比如SecureCRT或者Putty选择一个支持 gb2312的中文字体,比如"仿宋_GB2312",重新登陆ssh即可
其他的操作....都不需要...
echo "export LC_ALL" >> /etc/profile
然后给你的终端程序,比如SecureCRT或者Putty选择一个支持 gb2312的中文字体,比如"仿宋_GB2312",重新登陆ssh即可
其他的操作....都不需要...