提示:
en_US.ISO-8859-1...failed to set locale!
[error] cannot open locale definition file `en_GB': No such file or directory
done
en_US.ISO-8859-15...failed to set locale!
[error] cannot open locale definition file `en_GB': No such file or directory
done
en_US.UTF-8...failed to set locale!
[error] cannot open locale definition file `en_GB': No such file or directory
输出:
C
C.UTF-8
POSIX
zh_CN.utf8
卸载locales和语言包,重新安装,再执行locale-gen
sudo apt-get purge locales sudo apt-get purge language-pack-en sudo apt-get install locales sudo apt-get install language-pack-en sudo locale-gen en_us.utf-8
安装中文语言包,sudo apt install language-pack-hans 即可安装zh_cn.utf8
再次执行:locale -a
:~$ locale -a C 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_IL en_IL.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 zh_CN.utf8
字符集生效之后,即可通过修改相关配置切换字符集。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)