Apt 实用程序:MergeList 问题...无法解析或打开包列表或状态文件

Apt 实用程序:MergeList 问题...无法解析或打开包列表或状态文件

当我运行upgradeordist-upgradeaptor时apt-get,我得到

❯ sudo apt-get dist-upgrade;
Reading package lists... Error!
E: Encountered a section with no Package: header
E: Problem with MergeList /var/lib/apt/lists/deb.debian.org_debian_dists_bullseye_main_i18n_Translation-en
E: The package lists or status file could not be parsed or opened.

我在使用 apt-cache 时也遇到此错误。

出了什么问题,我该如何解决?

答案1

我首先尝试做的是仅移动有问题的文件,

/var/lib/apt/lists/deb.debian.org_debian_dists_bullseye_main_i18n_Translation-en

尽管问题刚刚迁移,但这并没有奏效,

Reading package lists... Error!
E: Problem parsing dependency 55 of erlang-common-test:amd64=1:23.2.6+dfsg-1
E: Error occurred while processing erlang-common-test (NewVersion2)
E: Problem with MergeList /var/lib/apt/lists/deb.debian.org_debian_dists_bullseye_main_binary-amd64_Packages
E: The package lists or status file could not be parsed or opened.

此时我跑了

sudo rm -r /var/lib/apt/lists/*

并重新运行apt-get update。现在一切都很好。

相关内容