≡ Menu

Debian / Ubuntu Linux: E: Encountered a section with no Package: header Error and Solution

I'm running the apt-get update command to fetch updates but getting the following errors:

Get:1 http://security.debian.org squeeze/updates Release.gpg [836 B]
Ign http://security.debian.org/ squeeze/updates/contrib Translation-en
Ign http://security.debian.org/ squeeze/updates/contrib Translation-en_IN
Ign http://security.debian.org/ squeeze/updates/main Translation-en
Ign http://security.debian.org/ squeeze/updates/main Translation-en_IN
Ign http://security.debian.org/ squeeze/updates/non-free Translation-en
Ign http://security.debian.org/ squeeze/updates/non-free Translation-en_IN
Get:2 http://security.debian.org squeeze/updates Release [86.9 kB]
Get:3 http://security.debian.org squeeze/updates/main Sources [89.5 kB]
Get:4 http://security.debian.org squeeze/updates/contrib Sources [765 B]
Get:5 http://security.debian.org squeeze/updates/non-free Sources [20 B]
Get:6 http://security.debian.org squeeze/updates/main amd64 Packages [273 kB]
Get:7 http://security.debian.org squeeze/updates/contrib amd64 Packages [620 B]
Get:8 http://security.debian.org squeeze/updates/non-free amd64 Packages [20 B]
Hit http://mirror.anl.gov squeeze Release.gpg
Ign http://mirror.anl.gov/debian/ squeeze/contrib Translation-en
Ign http://mirror.anl.gov/debian/ squeeze/contrib Translation-en_IN
Ign http://mirror.anl.gov/debian/ squeeze/main Translation-en
Ign http://mirror.anl.gov/debian/ squeeze/main Translation-en_IN
Ign http://mirror.anl.gov/debian/ squeeze/non-free Translation-en
Ign http://mirror.anl.gov/debian/ squeeze/non-free Translation-en_IN
Hit http://mirror.anl.gov squeeze Release
Hit http://mirror.anl.gov squeeze/main Sources
Hit http://mirror.anl.gov squeeze/non-free Sources
Hit http://mirror.anl.gov squeeze/contrib Sources
Hit http://mirror.anl.gov squeeze/main amd64 Packages
Hit http://mirror.anl.gov squeeze/non-free amd64 Packages
Hit http://mirror.anl.gov squeeze/contrib amd64 Packages
Fetched 451 kB in 12s (36.5 kB/s)
Reading package lists... Error!
E: Encountered a section with no Package: header
E: Problem with MergeList /var/lib/apt/lists/security.debian.org_dists_squeeze_updates_contrib_i18n_Translation-en
E: The package lists or status file could not be parsed or opened.

How do I fix this problem under Debian or Ubuntu Linux operating systems?

To solve this problem login as root user and type the following commands:
# rm -rf /var/lib/apt/lists/*
# apt-get update

Sample outputs:

Get:1 http://security.debian.org squeeze/updates Release.gpg [836 B]
Ign http://security.debian.org/ squeeze/updates/contrib Translation-en
Ign http://security.debian.org/ squeeze/updates/contrib Translation-en_IN
Get:2 http://mirror.anl.gov squeeze Release.gpg [1,672 B]
Ign http://mirror.anl.gov/debian/ squeeze/contrib Translation-en
Ign http://security.debian.org/ squeeze/updates/main Translation-en
Ign http://security.debian.org/ squeeze/updates/main Translation-en_IN
Ign http://security.debian.org/ squeeze/updates/non-free Translation-en
Ign http://security.debian.org/ squeeze/updates/non-free Translation-en_IN
Get:3 http://security.debian.org squeeze/updates Release [86.9 kB]
Ign http://mirror.anl.gov/debian/ squeeze/contrib Translation-en_IN
Ign http://mirror.anl.gov/debian/ squeeze/main Translation-en
Ign http://mirror.anl.gov/debian/ squeeze/main Translation-en_IN
Ign http://mirror.anl.gov/debian/ squeeze/non-free Translation-en
Ign http://mirror.anl.gov/debian/ squeeze/non-free Translation-en_IN
Get:4 http://mirror.anl.gov squeeze Release [107 kB]
Get:5 http://security.debian.org squeeze/updates/main Sources [89.5 kB]
Get:6 http://security.debian.org squeeze/updates/contrib Sources [765 B]
Get:7 http://security.debian.org squeeze/updates/non-free Sources [20 B]
Get:8 http://security.debian.org squeeze/updates/main amd64 Packages [273 kB]
Get:9 http://security.debian.org squeeze/updates/contrib amd64 Packages [620 B]
Get:10 http://security.debian.org squeeze/updates/non-free amd64 Packages [20 B]
Get:11 http://mirror.anl.gov squeeze/main Sources [5,767 kB]
Get:12 http://mirror.anl.gov squeeze/non-free Sources [88.8 kB]
Get:13 http://mirror.anl.gov squeeze/contrib Sources [48.2 kB]
Get:14 http://mirror.anl.gov squeeze/main amd64 Packages [8,603 kB]
Get:15 http://mirror.anl.gov squeeze/non-free amd64 Packages [124 kB]
Get:16 http://mirror.anl.gov squeeze/contrib amd64 Packages [64.0 kB]
Fetched 15.3 MB in 43s (354 kB/s)
Reading package lists... Done

Finally, apply new updates, enter:
# apt-get upgrade
Sample outputs:

Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be upgraded:
  curl libcurl3 libpng12-0 libtiff4
4 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 893 kB of archives.
After this operation, 36.9 kB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://security.debian.org/ squeeze/updates/main libcurl3 amd64 7.21.0-2.1+squeeze2 [285 kB]
Get:2 http://security.debian.org/ squeeze/updates/main curl amd64 7.21.0-2.1+squeeze2 [229 kB]
Get:3 http://security.debian.org/ squeeze/updates/main libpng12-0 amd64 1.2.44-1+squeeze4 [180 kB]
Get:4 http://security.debian.org/ squeeze/updates/main libtiff4 amd64 3.9.4-5+squeeze4 [198 kB]
Fetched 893 kB in 8s (110 kB/s)
Reading changelogs... Done
(Reading database ... 29345 files and directories currently installed.)
Preparing to replace libcurl3 7.21.0-2.1+squeeze1 (using .../libcurl3_7.21.0-2.1+squeeze2_amd64.deb) ...
Unpacking replacement libcurl3 ...
Preparing to replace curl 7.21.0-2.1+squeeze1 (using .../curl_7.21.0-2.1+squeeze2_amd64.deb) ...
Unpacking replacement curl ...
Preparing to replace libpng12-0 1.2.44-1+squeeze3 (using .../libpng12-0_1.2.44-1+squeeze4_amd64.deb) ...
Unpacking replacement libpng12-0 ...
Preparing to replace libtiff4 3.9.4-5+squeeze3 (using .../libtiff4_3.9.4-5+squeeze4_amd64.deb) ...
Unpacking replacement libtiff4 ...
Processing triggers for man-db ...
Setting up libcurl3 (7.21.0-2.1+squeeze2) ...
Setting up curl (7.21.0-2.1+squeeze2) ...
Setting up libpng12-0 (1.2.44-1+squeeze4) ...
Setting up libtiff4 (3.9.4-5+squeeze4) ...
Tweet itFacebook itGoogle+ itPDF itFound an error/typo on this page?

{ 14 comments… add one }

  • Oudin August 20, 2012, 3:59 am

    This still didn’t solve my error

  • joan September 21, 2012, 1:27 pm

    didnt solve my problem either

  • Stef October 26, 2012, 3:42 pm

    This did solve my problem! Thank you

  • Simon November 1, 2012, 7:55 am

    This solved the problem for me. Thanks.

  • Mach November 21, 2012, 4:57 pm

    Thanks a lot! This worked for me on Ubuntu 12.10!

    Best regards!

  • paulo rocha March 10, 2013, 8:18 pm

    Thaks – obrigado!

  • Phil April 14, 2013, 4:57 pm

    Many Thanks !
    Worked perfectly !

  • Castor June 25, 2013, 4:52 am

    Thanks so much!

  • nie se June 28, 2013, 11:17 am

    Thank you!

    rm -rf /var/lib/apt/lists/* solved my problem with exact the same error message. Before I had severel crashes due that error.

  • ahmed July 16, 2013, 1:46 pm

    E: Dynamic MMap ran out of room. Please increase the size of APT::Cache-Limit. Current value: 25165824. (man 5 apt.conf)
    E: Error occurred while processing pike7.6-svg (NewFileDesc2)
    E: Problem with MergeList /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_lucid_universe_binary-i386_Packages
    E: The package lists or status file could not be parsed or opened.
    E: _cache->open() failed, please report.

  • ahmed July 16, 2013, 1:47 pm

    Lists directory /var/lib/apt/lists/partial is missing.

  • Resuna August 3, 2013, 2:14 pm

    Why doesn’t it discard and re-download empty files? Seems like a simple fix.

  • aye.semaphore September 10, 2013, 5:48 pm

    thank you for help! works perfectly!

  • stock October 28, 2013, 9:11 am

    This solve the problem for me on Linux Mint 14, thanks!!

Leave a Comment