无法更正区域设置

无法更正区域设置

我正在运行公司提供的 Ubuntu 映像,它似乎一开始就有一些奇怪的语言环境设置。Firefox 默认使用法语词典,当我使用 SSH(git pull/push 和普通 SSH 会话)进行任何操作时都会收到警告。

这些警告如下所示:

perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
        LANGUAGE = (unset),
        LC_ALL = (unset),
        LC_PAPER = "en_GB.UTF-8",
        LC_ADDRESS = "en_GB.UTF-8",
        LC_MONETARY = "en_GB.UTF-8",
        LC_NUMERIC = "en_GB.UTF-8",
        LC_TELEPHONE = "en_GB.UTF-8",
        LC_IDENTIFICATION = "en_GB.UTF-8",
        LC_MEASUREMENT = "en_GB.UTF-8",
        LC_TIME = "en_GB.UTF-8",
        LC_NAME = "en_GB.UTF-8",
        LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").

我一直尝试en_GB.UTF-8使用在 askubuntu.com 等网站上找到的信息来设置我的语言环境,但无法正常工作。我当前的/etc/default/locale文件包含以下内容。

LANG="en_GB"
LANGUAGE="en_GB:en"

这是我的命令的结果locale

LANG=en_GB.UTF-8
LANGUAGE=en_GB:en
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=

有人知道该设置什么来纠正这个问题吗?

谢谢。

答案1

尝试将此行:添加 en_US.ISO-8859-1 ISO-8859-1到此文件: 。然后在命令行中/var/lib/locales/supported.d/en运行。dpkg-reconfigure locales

相关内容