首页 > 系统相关 >【Go学习】Ubuntu18.04执行localedef -i en_US -f UTF-8 en_US.UTF-8

【Go学习】Ubuntu18.04执行localedef -i en_US -f UTF-8 en_US.UTF-8

时间:2022-08-24 19:13:07浏览次数:67  
标签:localedef en UTF US file directory

Ubuntu18.04执行localedef -i en_US -f UTF-8 en_US.UTF-8报如下错误:

[error] character map file `UTF-8' not found: No such file or directory
[error] cannot read character map directory `/usr/share/i18n/charmaps': No such file or directory

进行系统排查之后,发现根本原因在于缺少中文语言包,解决方案如下:

1.安装中文语言包

apt-get install language-pack-zh #早期版本
或者

apt-get install language-pack-zh-hans #近期版本
2.生成语言环境数据库

localedef -i en_US -f UTF-8 en_US.UTF-8

3.设置语言环境

https://www.cnblogs.com/greentomlee/p/9917725.html
————————————————
版权声明:本文为CSDN博主「思绪缥缈」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/wzl1217333452/article/details/102961694

标签:localedef,en,UTF,US,file,directory
From: https://www.cnblogs.com/gtea/p/16621262.html

相关文章