语言支持无法打开

语言支持无法打开
$ gnome-language-selector
Traceback (most recent call last):
  File "/usr/bin/gnome-language-selector", line 22, in on_activate
    options=options)
  File "/usr/lib/python3/dist-packages/LanguageSelector/gtk/GtkLanguageSelector.py", line 199, in __init__
    self.updateLanguageView()
  File "/usr/lib/python3/dist-packages/LanguageSelector/gtk/GtkLanguageSelector.py", line 712, in updateLanguageView
    self.openCache(progress)
  File "/usr/lib/python3/dist-packages/LanguageSelector/LanguageSelector.py", line 33, in openCache
    self._cache = LanguageSelector.LangCache.LanguageSelectorPkgCache(self._localeinfo, progress)
  File "/usr/lib/python3/dist-packages/LanguageSelector/LangCache.py", line 76, in __init__
    apt.Cache.__init__(self, progress)
  File "/usr/lib/python3/dist-packages/apt/cache.py", line 113, in __init__
    self.open(progress)
  File "/usr/lib/python3/dist-packages/apt/cache.py", line 164, in open
    self._cache = apt_pkg.Cache(progress)
SystemError: E:Unable to parse package file /var/lib/apt/lists/us.archive.ubuntu.com_ubuntu_dists_xenial-backports_main_binary-amd64_Packages (1), E:Encountered a section with no Package: header, E:Problem with MergeList /var/lib/apt/lists/us.archive.ubuntu.com_ubuntu_dists_xenial-backports_main_binary-i386_Packages, E:The package lists or status file could not be parsed or opened.

我正在尝试在我的系统上安装中文作为附加语言。

分销商 ID:Ubuntu 描述:Ubuntu 16.04 LTS 版本:16.04 代号:xenial

在系统设置中单击“语言支持”后,我看到一个新窗口打开“检查可用的语言支持”,但 3 秒后它关闭并且什么也没有发生。

在命令行中输入此内容后:

sudo apt-get -y install `check-language-support -l zh

我收到此错误信息...

Traceback (most recent call last):
  File "/usr/bin/check-language-support", line 53, in <module>
    ls = language_support_pkgs.LanguageSupport(None, pkg_depends)
  File "/usr/lib/python3/dist-packages/language_support_pkgs.py", line 13, in __init__
    self.apt_cache = apt.Cache()
  File "/usr/lib/python3/dist-packages/apt/cache.py", line 113, in __init__
    self.open(progress)
  File "/usr/lib/python3/dist-packages/apt/cache.py", line 164, in open
    self._cache = apt_pkg.Cache(progress)
SystemError: E:Unable to parse package file /var/lib/apt/lists/us.archive.ubuntu.com_ubuntu_dists_xenial-backports_main_binary-amd64_Packages (1), E:Encountered a section with no Package: header, E:Problem with MergeList /var/lib/apt/lists/us.archive.ubuntu.com_ubuntu_dists_xenial-backports_main_binary-i386_Packages, E:The package lists or status file could not be parsed or opened.
Reading package lists... Error!
E: Unable to parse package file /var/lib/apt/lists/us.archive.ubuntu.com_ubuntu_dists_xenial-backports_main_binary-amd64_Packages (1)
E: Encountered a section with no Package: header
E: Problem with MergeList /var/lib/apt/lists/us.archive.ubuntu.com_ubuntu_dists_xenial-backports_main_binary-i386_Packages
E: The package lists or status file could not be parsed or opened.

我如何安装中文?为什么我会收到这些错误消息?我该如何解决?感谢所有能提供帮助的人。

答案1

好的,我认为你应该运行字节指挥官指出的答案

sudo rm /var/lib/apt/lists/*
sudo apt update

编辑

简单来说,由于某种原因,您在更新期间在缓存中得到了格式错误的文件,而此解决方案的作用是清理缓存并获取新信息,从而删除格式错误的文件。

相关内容