服务器中文显示乱码

刚买的云服务器中文乱码,

 

locale  -a
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

 

 

解决方法:
挨个执行下面四条命令:
export LANGUAGE=en_US.UTF-8
export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8

 

参考自:https://blog.51cto.com/liyanxin/1395727

 

搞定

posted @ 2021-08-08 21:30  宝山方圆  阅读(254)  评论(0编辑  收藏  举报