当我运行upgrade
ordist-upgrade
与apt
or时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
。现在一切都很好。