![区域设置问题](https://linux22.com/image/1196238/%E5%8C%BA%E5%9F%9F%E8%AE%BE%E7%BD%AE%E9%97%AE%E9%A2%98.png)
我使用 Ubuntu 23.04“Lunar Lobster”作为我的操作系统
,我试图打开 rofi,但我得到了
(process:24596): Rofi-WARNING **: 01:06:51.568: Failed to set locale.
所以看起来它与语言环境有关,经过一番研究我发现了一个奇怪的问题
我已经检查了 /etc/locale.gen 文件并取消注释 ar_EG.UTF-8 UTF-8 行,并在使用命令编辑 /etc/locale.gen 后重新生成区域设置:sudo locale-gen
我得到了这个
Generating locales (this might take a while)...
ar_EG.UTF-8... done
ar_AE.UTF-8... done
ar_BH.UTF-8... done
ar_DZ.UTF-8... done
ar_EG.UTF-8... done
ar_IN.UTF-8... done
ar_IQ.UTF-8... done
ar_JO.UTF-8... done
ar_KW.UTF-8... done
ar_LB.UTF-8... done
ar_LY.UTF-8... done
ar_MA.UTF-8... done
ar_OM.UTF-8... done
ar_QA.UTF-8... done
ar_SA.UTF-8... done
ar_SD.UTF-8... done
ar_SS.UTF-8... done
ar_SY.UTF-8... done
ar_TN.UTF-8... done
ar_YE.UTF-8... done
en_AG.UTF-8... done
en_AU.UTF-8... done
en_BW.UTF-8... done
en_CA.UTF-8... done
en_DK.UTF-8... done
en_GB.UTF-8... done
en_HK.UTF-8... done
en_IE.UTF-8... done
en_IL.UTF-8... done
en_IN.UTF-8... done
en_NG.UTF-8... done
en_NZ.UTF-8... done
en_PH.UTF-8... done
en_SG.UTF-8... done
en_US.UTF-8... done
en_ZA.UTF-8... done
en_ZM.UTF-8... done
en_ZW.UTF-8... done
Generation complete.
那么为什么我得到了所有这些语言环境,它应该只有两个语言环境吗?命令:grep -v ^# /etc/locale.gen 输出
ar_EG.UTF-8 UTF-8
en_US.UTF-8 UTF-8
即使 localectl 命令没有在系统区域设置中显示任何内容,除了 en_US.UTF-8 ,ar_eg.utf-8 在哪里?
System Locale: LANG=en_US.UTF-8
VC Keymap: (unset)
X11 Layout: us
X11 Model: pc105
有关命令和输出的更多信息:
命令localectl list-locales
C.UTF-8
ar_AE.UTF-8
ar_BH.UTF-8
ar_DZ.UTF-8
ar_EG.UTF-8
ar_IN.UTF-8
ar_IQ.UTF-8
ar_JO.UTF-8
ar_KW.UTF-8
ar_LB.UTF-8
ar_LY.UTF-8
ar_MA.UTF-8
ar_OM.UTF-8
ar_QA.UTF-8
ar_SA.UTF-8
ar_SD.UTF-8
ar_SS.UTF-8
ar_SY.UTF-8
ar_TN.UTF-8
ar_YE.UTF-8
en_AG.UTF-8
en_AU.UTF-8
en_BW.UTF-8
我的问题似乎是我已经启用了所有可用的语言环境,为什么我的 /etc/locale.gen 文件只有 2 个启用的语言环境 !!! 我是否有一个干扰 rofi 的软件包??
答案1
我已经通过设置删除已安装的语言来修复它 => 管理已安装的语言 => 安装/删除语言然后删除阿拉伯语和额外的英语语言我不需要我的输出现在看起来像这样
命令 :sudo locale-gen
Generating locales (this might take a while)...
ar_EG.UTF-8... done
en_US.UTF-8... done
Generation complete.