LC_CTYPE: cannot change locale (en_US.

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了LC_CTYPE: cannot change locale (en_US.相关的知识,希望对你有一定的参考价值。

升级glibc库后,使用SecureCRT登录linux,提示:

ast login: Mon Feb 20 02:03:21 2017 from 192.168.4.187

-bash: warning: setlocale: LC_CTYPE: cannot change locale (en_US.UTF-8): No such file or directory

-bash: warning: setlocale: LC_COLLATE: cannot change locale (en_US.UTF-8): No such file or directory

-bash: warning: setlocale: LC_MESSAGES: cannot change locale (en_US.UTF-8): No such file or directory

-bash: warning: setlocale: LC_NUMERIC: cannot change locale (en_US.UTF-8): No such file or directory

-bash: warning: setlocale: LC_TIME: cannot change locale (en_US.UTF-8): No such file or directory


执行more /etc/sysconfig/i18n命令检查系统字符集


[[email protected] ~]# more  /etc/sysconfig/i18n 

LANG="en_US.UTF-8"

SUPPORTED="zh_CN.GB18030:zh_CN:zh:zh_CN.UTF-8:en_US:en"

SYSFONT="latarcyrheb-sun16"


执行locale命令,提示如下异常,说明说明没安装en_US的local


[[email protected] ~]# 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.UTF-8

LC_CTYPE="en_US.UTF-8"

LC_NUMERIC="en_US.UTF-8"

LC_TIME="en_US.UTF-8"

LC_COLLATE="en_US.UTF-8"

LC_MONETARY="en_US.UTF-8"

LC_MESSAGES="en_US.UTF-8"

LC_PAPER="en_US.UTF-8"

LC_NAME="en_US.UTF-8"

LC_ADDRESS="en_US.UTF-8"

LC_TELEPHONE="en_US.UTF-8"

LC_MEASUREMENT="en_US.UTF-8"

LC_IDENTIFICATION="en_US.UTF-8"

LC_ALL=


解决方案,修改如下:

vi /etc/sysconfig/i18n

# 添加下面的

LC_ALL=C

export LC_ALL

# 再执行下面的语句,使之生效

source /etc/sysconfig/i18n


以上是关于LC_CTYPE: cannot change locale (en_US.的主要内容,如果未能解决你的问题,请参考以下文章

Mac iTerm2登陆CentOS提示warning: setlocale: LC_CTYPE: cannot change locale (UTF-8): No such file or dire

CentOS -bash: warning: setlocale: LC_MESSAGES: cannot change locale (en_US.UTF-8)

登陆报错:-bash: warning: setlocale: LC_CTYPE: cannot c

Debian下Cannot set LC_CTYPE to default locale: No such file or directory解决方法

Debian下Cannot set LC_CTYPE to default locale: No such file or directory解决方法

Linux中创建用户 su命令 显示不出来新建的用户 l su: warning: cannot change directory to /home/s