gnome-terminal不起作用,可能是因为区域设置

tub*_*ubo 4 locale gnome gnome-terminal archlinux

我在日文环境中安装了Antergos(Arch的简单版本)。但是我想将语言改为英语,因此我介绍了Wiki文章,然后在取消注释后运行一些命令#en_US.UTF-8 UTF-8/etc/locale.gen并编辑/etc/locale.conf以下内容:

LANG=en_US.UTF-8
LC_CTYPE=en_US.UTF-8
LC_NUMERIC=en_US.UTF-8
LC_TIME=en_US.UTF-8
LC_COLLATE=en_US.UTF-8
LC_MONETARY=en_US.UTF-8
LC_MESSAGES=en_US.UTF-8
LC_PAPER=en_US.UTF-8
LC_NAME=en_US.UTF-8
LC_ADDRESS=en_US.UTF-8
LC_TELEPHONE=en_US.UTF-8
LC_MEASUREMENT=en_US.UTF-8
LC_IDENTIFICATION=en_US.UTF-8
LC_ALL=
Run Code Online (Sandbox Code Playgroud)

问题从这里开始。

我重新启动计算机,发现gnome-terminal不起作用。我将eshell替换为Emacs并运行gnome-terminal命令,然后收到错误消息:

(process:1202): Gtk-WARNING **: Locale not supported by C library.
Using the fallback 'C' locale.
Error constructing proxy for org.gnome.Terminal:/org/gnome/Terminal/Factory0: Error calling StartServiceByName for org.gnome.Terminal: GDBus.Error:org.freedesktop.DBus.Error.Spawn.ChildExited: Process org.gnome.Terminal exited with status 8
Run Code Online (Sandbox Code Playgroud)

locale命令的输出如下:

locale: Cannot set LC_ALL to default locale: No such file or directory
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC=ja_JP.utf8
LC_TIME=ja_JP.utf8
LC_COLLATE="en_US.UTF-8"
LC_MONETARY=ja_JP.utf8
LC_MESSAGES="en_US.UTF-8"
LC_PAPER=ja_JP.utf8
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT=ja_JP.utf8
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=
Run Code Online (Sandbox Code Playgroud)

是什么将语言环境设置的某些部分更改为日语?还是存在终止gnome-terminal的其他原因?

我尝试过在这里https://bbs.archlinux.org/viewtopic.php?id=180103提出的解决方案。

谢谢。

小智 5

我前段时间有同样的问题。我修复了运行此命令的语言环境配置

sudo localedef -f UTF-8 -i en_US en_US.UTF-8
Run Code Online (Sandbox Code Playgroud)


Nic*_*las 0

您是否想过在编辑文件后重新生成区域设置/etc/locale.gen

语言环境生成器

我认为在你的解释中你混合了/etc/locale.gen/etc/locale.conf文件。确保您使用正确的值编辑了正确的文件。