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

CentOS安装中文支持包

时间:2018-04-06 13:48:26      阅读:363      评论:0      收藏:0      [点我收藏+]

标签:变量   int   str   中文字符集   glib   message   operator   file   lan   

修改配置文件

LANG="zh_CN.UTF-8"

改为中文字符集

然后在查看更改后的系统语言变量

[root@5c46832b5c01 ~]# 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=zh_CN.UTF-8
LC_CTYPE="zh_CN.UTF-8"
LC_NUMERIC="zh_CN.UTF-8"
LC_TIME="zh_CN.UTF-8"
LC_COLLATE="zh_CN.UTF-8"
LC_MONETARY="zh_CN.UTF-8"
LC_MESSAGES="zh_CN.UTF-8"
LC_PAPER="zh_CN.UTF-8"
LC_NAME="zh_CN.UTF-8"
LC_ADDRESS="zh_CN.UTF-8"
LC_TELEPHONE="zh_CN.UTF-8"
LC_MEASUREMENT="zh_CN.UTF-8"
LC_IDENTIFICATION="zh_CN.UTF-8"
LC_ALL=

查看语言包

[root@5c46832b5c01 ~]# 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
en_US.utf8

发现没有中文,安装一个,注意7跟6不一样

# yum install kde-l10n-Chinese
#yum reinstall glibc-common

再次查看

[root@ce1d2002a999 ~]# cat test  
我的意思是
[root@ce1d2002a999 ~]# vi test 

我的意思是

更改完毕!!

CentOS安装中文支持包

标签:变量   int   str   中文字符集   glib   message   operator   file   lan   

原文地址:https://www.cnblogs.com/xiaoruilin/p/8727357.html

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