无法打开 gnome-terminal ubuntu 15.10(区域设置错误)

无法打开 gnome-terminal ubuntu 15.10(区域设置错误)

你好,Ubuntu 社区!

最近我下载并安装了 ubuntu,经过一些试验后,我无法打开我的终端!

我给机器输入以下命令后出现了问题:

sudo apt-get -o Dpkg::Options::="--force-overwrite" install locales

现在我只能打开 xTerm,但无法从中复制/粘贴...

我已经尝试过apt-get purge gnome-terminal/ apt-get install gnome-terminal,但无法修复它!

拜托我需要你的帮忙!

編輯:

gnome-terminal这是我尝试在 xTerm 上执行时收到的错误:

Gtk-WARNING **: Locale not supported by C library.
Using the fallbac 'C' locale.
Error constructing proxy for org.gnome.Terminal: GDBus.Error:org.freedesktop.DBus.Error.Spawn.ChildExited: Process org.gnome.Terminal exited with status 8

编辑2:是的,这确实可能是区域设置问题...但我还不知道如何解决它!

运行后,sudo apt-get install language-pack-en-base它说包已经安装,但是当我运行sudo dpkg-reconfigure locales它时,它给出了以下 perl 错误:

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

有人知道如何修复它吗?

答案1

您需要做的就是重新生成损坏的语言环境文件来修复此问题。只需执行
sudo locale-gen
并检查文件是否
/etc/default/locale
具有以下 2 个定义, 并且可能使用您所在国家/地区的时间、数字、货币类型的 其他值进行设置。 LANG="en_US.UTF-8"
LANGUAGE="en_US"
LC_*

相关内容