ssh 登录远程Centos服务器异常,Locale: Cannot set LC_CTYPE to defauLt Locale: No Such file or directory
详情如下:
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_COLLATE to default Locale: No such file or directory
在服务器上使用locale -a 查看支撑的字符集报错,显示如下:
[root@localhost]# 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_COLLATE to default Locale: No such file or directory
C
POSIX
查看/usr/lib/locale目录发现目录不存在,可能被误删除;
解决方案:使用其他服务器的/usr/lib/locale目录,完全复制到异常报错的主机即可完成修复。