Failed to set locale, defaulting to C.UTF-8 报错

背景:用Dokfile只做了镜像,启动容器后yum安装软件发现安装失败报错

报错提示:

[root@localhost /]# yum -y install kde-l10n-Chinese 
Failed to set locale, defaulting to C.UTF-8
Last metadata expiration check: 0:00:12 ago on Fri Jun  4 02:45:10 2021.
No match for argument: kde-l10n-Chinese
Error: Unable to find a match: kde-l10n-Chinese
[root@localhost /]# 

原因:通过报错可知是由于语言不对导致

 

查看语言环境

Failed to set locale, defaulting to C.UTF-8 报错

 

 

 

 安装语言包

yum -y install glibc-langpack-en

再次查看

Failed to set locale, defaulting to C.UTF-8 报错

 

  重新安装,报错消失,但依旧无法安装,检查后发现该安装包适配centos7,本系统为centos8,跟换后安装成功

[root@localhost /]# yum -y install kde-l10n-Chinese 
Last metadata expiration check: 0:05:24 ago on Fri 04 Jun 2021 02:45:10 AM UTC.
No match for argument: kde-l10n-Chinese
Error: Unable to find a match: kde-l10n-Chinese
[root@localhost /]# cat /etc/redhat-release 
CentOS Linux release 8.3.2011
[root@localhost /]# 

 

上一篇:[KDE小技巧]如何去掉KDE开启程序时鼠标下恼人的跳动图标?


下一篇:推荐!5款Linux常用桌面环境