码迷,mamicode.com
首页 > 其他好文 > 详细

LC_CTYPE: cannot change locale (en_US.

时间:2018-04-13 12:11:39      阅读:166      评论:0      收藏:0      [点我收藏+]

标签:LC_CTYPE错误

升级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命令检查系统字符集


[root@dashuju172 ~]# 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


[root@dashuju172 ~]# 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.

标签:LC_CTYPE错误

原文地址:http://blog.51cto.com/11310506/2102817

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!