2
pi:~ $ sudo apt-get update
Hit:1 http://archive.raspberrypi.org/debian buster InRelease
Hit:2 http://raspbian.raspberrypi.org/raspbian buster InRelease
Reading package lists... Error!
E: Encountered a section with no Package: header
E: Problem with MergeList /var/lib/apt/lists/raspbian.raspberrypi.org_raspbian_dists_buster_main_binary-armhf_Packages
E: The package lists or status file could not be parsed or opened.
AsianXL
  • 151
  • 3
  • 6

2 Answers2

3

There is a problem with your lists of packages which are contained in the repository. You can try to reinitialize the lists under control of the package manager. How to do that you can look at Raspberry Pi sudo apt-get update not working.

Ingo
  • 42,107
  • 20
  • 85
  • 197
0

Try this:

sudo rm /var/lib/dpkg/status
sudo touch /var/lib/dpkg/status

If that doesn't work try this:

sudo rm /var/lib/apt/lists/raspbian.raspberrypi.org_raspbian_dists_buster_main_binary-armhf_Packages
sudo touch /var/lib/apt/lists/raspbian.raspberrypi.org_raspbian_dists_buster_main_binary-armhf_Packages
Unsigned_Arduino
  • 247
  • 2
  • 12
  • This is terrible advice. /var/lib/dpkg/status is the file that tracks which packages are installed on your system. If you remove it, apt and dpkg will entirely forget what packages you have installed, leaving you with an un-updatable system. Do not do this unless you are absolutely certain that /var/lib/dpkg/status is the file which is broken. Rather than removing the file, make a backup: mv /var/lib/dpkg/status /var/lib/dpkg/status.maybebroken. – Mr. DOS Jun 20 '22 at 21:23