无法在 Debian Stretch 上加载 gnome-terminal,“不支持非 UTF-8 语言环境!”

无法在 Debian Stretch 上加载 gnome-terminal,“不支持非 UTF-8 语言环境!”

我刚刚在之前运行 Jessie 的服务器上完成了 Debian Stretch 的全新安装,并/home保留了该安装。

现在gnome-terminal无法加载。这是syslog

18:29:02 alan dbus-daemon[918]: Activating via systemd: service name='org.gnome.Terminal'     nome-terminal-server.service'
18:29:02 alan systemd[899]: Starting GNOME Terminal Server...
18:29:02 alan gnome-terminal-server[4714]: Non UTF-8 locale (ANSI_X3.4-1968) is not supported!
18:29:02 alan systemd[899]: gnome-terminal-server.service: Main process exited, code=exited, status=8/     18:29:02 alan systemd[899]: Failed to start GNOME Terminal Server.
18:29:02 alan systemd[899]: gnome-terminal-server.service: Unit entered failed state.
18:29:02 alan systemd[899]: gnome-terminal-server.service: Failed with result 'exit-code'.
18:29:27 alan org.gnome.Shell.desktop[1003]: Error constructing proxy for org.gnome.Terminal:/org/    erminal/Factory0: Error calling StartServiceByName for org.gnome.Terminal: Timeout was reached
18:29:46 alan firefox-esr.desktop[1732]: Promise resolved while context is inactive
18:29:47 alan firefox-esr.desktop[1732]: Promise rejected after context unloaded: Message manager     ected
18:31:02 alan dbus-daemon[918]: Failed to activate service 'org.gnome.Terminal': timed out

我认为非 UTF 语言环境是问题所在,并根据谷歌搜索尝试了以下修复:

设置/etc/environment为包含

LANG="en_GB.UTF-8"
LCALL="en_GB.UTF-8"

设置/etc/default/locale

LANG=en_GB.UTF-8

并重新启动。区域设置现在返回

root@alan:/etc# locale
LANG=en_GB.UTF-8
LANGUAGE=
LC_CTYPE=en_GB.UTF-8
LC_NUMERIC="en_GB.UTF-8"
LC_TIME="en_GB.UTF-8"
LC_COLLATE="en_GB.UTF-8"
LC_MONETARY="en_GB.UTF-8"
LC_MESSAGES="en_GB.UTF-8"
LC_PAPER="en_GB.UTF-8"
LC_NAME="en_GB.UTF-8"
LC_ADDRESS="en_GB.UTF-8"
LC_TELEPHONE="en_GB.UTF-8"
LC_MEASUREMENT="en_GB.UTF-8"
LC_IDENTIFICATION="en_GB.UTF-8"
LC_ALL=

gnome-terminal仍然无法加载。

这真的是一个区域设置问题吗?从哪里gnome-terminal获取它的语言环境?还有什么可能导致这种情况?

答案1

你可以运行(以 root 或 sudo 身份)...

dpkg-reconfigure locales

看看是否可以解决问题?

相关内容