ubuntu无法安装en

ubuntu无法安装en,第1张

ubuntu无法安装en 问题描述: 1.运行: sudo locale-gen en_us.utf-8  或 en_us

提示:

 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

2. 运行locale -a,显示系统中没有en_us.utf8字符集

    输出:

        C
        C.UTF-8

        POSIX
        zh_CN.utf8

3.运行dpkg-reconfigure locales 尝试安装en_us.utf-8也不成功

解决:

        卸载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

字符集生效之后,即可通过修改相关配置切换字符集。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/zaji/5436592.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-12-12
下一篇 2022-12-11

发表评论

登录后才能评论

评论列表(0条)

保存