红联Linux门户
Linux帮助

Ubuntu下zh_CN.UTF-8 locale找不到的问题

发布时间:2016-05-17 10:15:08来源:linux网站作者:ludengji

在使用man 命令查看  locale 的时候报错:
man: can't set the locale; make sure $LC_* and $LANG are correct 


输入 locale 命令,得到如下信息:
locale 
locale: Cannot set LC_CTYPE 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 
LANGUAGE=en_US: 
LC_CTYPE=zh_CN.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= 


查看所有locale -a,并没有找到中文相关的设置:
locale: Cannot set LC_CTYPE to default locale: No such file or directory 

C.UTF-8 
en_AG 
en_AG.utf8 
en_AU.utf8 
en_BW.utf8 
en_CA.utf8 
en_DK.utf8 
en_GB.utf8 
en_HK.utf8 
en_IE.utf8 
en_IN 
en_IN.utf8 
en_NG 
en_NG.utf8 
en_NZ.utf8 
en_PH.utf8 
en_SG.utf8 
en_US.utf8 
en_ZA.utf8 
en_ZM 
en_ZM.utf8 
en_ZW.utf8 
POSIX 


解决办法:
sudo apt-get -y install language-pack-zh-hans


本文永久更新地址:http://www.linuxdiyf.com/linux/20713.html