October 11, 2024

While using the package manager or trying to install applications through Terminal, it is possible to get a nasty error which is something like this :

E:Encountered a section with no Package: header,

E:Problem with MergeList /var/lib/apt/lists /us.archive.ubuntu.com_ubuntu_dists_natty_main_binary-i386_Packages,

E:The package lists or status file could not be parsed or opened.

This will prevent from  installing or upgrading any application in Ubuntu 11.04. Fortunately, the fix is simple for this.

From the Terminal type the following commands :

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

and

sudo apt-get update

This will delete the older entries and download the latest ones after which the error should no longer be there.

[ In fact, to avoid remembering these commands, they can be put in a shell script and only that script needs to be executed. Check out this post on how to do that.]

Cheers.

Update : In Linux Mint 15, you can simply fix this using a few clicks. Check out the post here.

By admin

Related Post

80 thoughts on “How To Fix “Problem with MergeList /var/lib/apt/lists” Error In Ubuntu 11.04”
  1. don’t forget to close update manager or you will get an error in your terminal at the end of it and have to start all over 🙂

  2. Thanks, I was going to try to copy them from another computer using the same distro. i could not find this anywhere else.

    1. Just open up the menu for your linux build and you will see it listed. The terminal is your black box command line interface, or your CLI where you can input line commands to make your linux desktop preform functions, like move files around, delete files, make new folders, ect.

  3. Thank you very much, you saved my life! Great post, thank goodness there are people like you on the web. Please keep up the good work. Best regards.

  4. great!! thank you very much, it works for me on ubuntu 12.04 behind goagent

  5. 非常感谢,在你这里解决了我的问题。
    Very thanks !

  6. i tried every commands but i have the same erreur ,lorsque je tape sudo apt-get update ,please help me
    Lecture des listes de paquets… Erreur !
    E: Encountered a section with no Package: header
    E: Problem with MergeList /var/lib/apt/lists/dz.archive.ubuntu.com_ubuntu_dists_natty_main_binary-i386_Packages
    E: Les listes de paquets ou le fichier status ne peuvent être analysis ou lus.

  7. If you are going through a proxy you may need to add this setting to apt.conf:

    cat /etc/apt/apt.conf.d/42borked-proxy
    Acquire::http::Pipeline-Depth “0”;

    1. This fixed my issue with apt-cacher:
      E: Could not open file /var/lib/apt/lists/x.x.x.x:3142_archive.ubuntu.com_ubuntu_dists_precise_restricted_binary-i386_Packages.IndexDiff – open (2: No such file or directory)

  8. While trying to install kile in Ubuntu 11.10, I am getting the following error message

    Reading package lists… Error!
    E: Encountered a section with no Package: header
    E: Problem with MergeList /var/lib/dpkg/status
    E: The package lists or status file could not be parsed or opened.

    I have tried the two commands you have listed. For sudo apt-get update I am getting an error message

    W: Failed to fetch 404 Not Found
    W: Failed to fetch 404 Not Found
    E: Some index files failed to download. They have been ignored, or old ones used instead.

    The sudo apt-get install command still gives error. Can you please help me solve this.

  9. @Mahesh :

    You may want to try downloading kile and untar it just to check if it is related to that application only :

    http://kile.sourceforge.net/download.php

    Alternatively, try cleaning and redownloading the repository :
    sudo rm -rf /var/lib/dpkg/updates/*
    sudo rm -rf /var/lib/apt/lists
    sudo mkdir /var/lib/apt/lists
    sudo mkdir /var/lib/apt/lists/partial
    sudo apt-get clean
    sudo apt-get update
    sudo dpkg –clear-avail
    sudo dpkg –configure -a
    sudo apt-get install -f
    sudo apt-get update
    sudo apt-get dist-upgrade

  10. William – You may want to try removing the old packages using apt-get remove, then remove the repository lists and run a fresh apt-get update to get the updates.

    Cheers.

  11. I actually am somewhat confused I have this same problem with the Dynamic MMap running out of room, and there being a problem/error with a MergeList /var/lib/apt/lists/updates.repository.backtrack-linux.org_dists_revolution_main_binary-i386_Packages However of course my system is Backtrack 4 R2/Linux/32-bit. I’ve been trying to upgrade my Mozilla Firefox to version 10.0.2 and I wanted to have the latest Adobe Flash Player which is alot harder. Anyways I have found problems with other things such as Synaptics doesn’t want to open and crashes upon trying to do so, so it really seems to me like all my “apt-get upgrade” commands or download managers are messed up. Any idea where to begin? Please? Thank you.

  12. Gracias, fue de mucha ayuda… casi desisto de usar este sistema operativo… el error que se genero fue a causa de que yo necesitaba loguearme por un hostpot y ¿no se como lo habia configurado al inicio de la instalacion? pero paso sin login y cargo sus actualizaciones en la instalacion.. despues quedo registrado asi y no funcionaba ien el update.

  13. I realised I made a horrible mistake. Namely, I managed to oversee that you are talking about 11.04, and my problem is in 10.10. 🙁 Anyway, do you have any ideas how I might solve it?

  14. I see that many people have similar problems with this version of Ubuntu. I tried what you suggested, but it didn’t do the job. This is my problem: reading of the update package stops at 4%, and will not continue. I tried all the things you said (yes, including sudo rm /var/lib/apt/lists/* -vf, sudo apt-get clean, sudo apt-get update) and it won’t help. This is the error message I get:

    Reading package lists… Error!
    E: Malformed 3rd word in the Status line
    E: Error occurred while processing lksctp-tools (UsePackage1)
    E: Problem with MergeList /var/lib/dpkg/status
    E: The package lists or status file could not be parsed or opened.

    Anyone, help?

  15. I am working on Ubuntu from the last one year and I found it to be wonderful. I never faced this error but my friend faced it while installing applications through terminal. Thanks this post helped him come out of it!

  16. THIS W: GPG error: https://security.ubuntu.com natty-security InRelease: The following signatures were invalid: NODATA 1 NODATA 2
    W: GPG error: https://archive.canonical.com natty InRelease: The following signatures were invalid: NODATA 1 NODATA 2
    W: GPG error: https://extras.ubuntu.com natty InRelease: The following signatures were invalid: NODATA 1 NODATA 2
    W: GPG error: https://us.archive.ubuntu.com natty InRelease: The following signatures were invalid: NODATA 1 NODATA 2
    and also
    E: Encountered a section with no Package: header
    E: Problem with MergeList /var/lib/apt/lists/us.archive.ubuntu.com_ubuntu_dists_natty_main_binary-i386_Packages
    E: The package lists or status file could not be parsed or opened.
    E: _cache->open() failed, please report.

    1. Joshua,
      Try running these commmands –
      sudo rm /var/lib/apt/lists/* -vf
      sudo apt-get clean
      sudo apt-get update

      and then try to install vlc.

      Regards,
      admins

  17. ok i’v tried this on ubuntu natty 11.04 but it doesn’t work.. im tryin to install vlc media player but wen it tries to update , half the files are not found and der are decoder errors then it tells me status files could not be parsed or open.. can u give ne other advice .. what exactly is causing this error.. does it have to do with the operating system i.e is it a bug or is this a network problem i.e blocked server or router.. thank you for ur speedy reply..

  18. This has not worked for me so far, I had trouble installing mediabuntu… the servers were stuffed. After solving this problem i now cant use the software center because of this error. now when i do these commands, it does the job, but since mediabuntu cant connect again, it uses the old source which is the broken one… how would i fix this?

    1. I actually fixed my own problem, if anyone else has this problem open up your terminal and press alt+F2 then type gksu gedit /etc/apt/sources.list
      once in this file find the text for the mediabuntu or whatever source creating this error and delete that text. save the document and return to terminal. then type
      sudo aptitude update

      Should be all fixed

  19. Después deinstalar ubuntu lo que menos esperaba es que no aparezca la terminal y que me diese este bug. Gracias a tu aporte se estan instalandolos repositorios en forma correcta. ¡Muchas gracias! desde la Isla de Tierra del fuego antártida e Islas Malvinas,
    [After ubuntu deinstalar the least expected is that the terminal does not appear to give me this bug. Thanks to your contribution repositories are being installed correctly.Thank you! from the island of Tierra del Fuego Antarctica and Falkland Islands,]

  20. Great information it really helps actually, I’ve been looking for some information in fixing this kind of errors and good thing to be here. Thanks for this great contribution.

  21. Thanks for your quick response.
    But, I am still struggling. I am a novice who doesn’t understand much of this installation stuff.

    I tried doing update as you indicated; it worked partially.. there were lot of “Page not found” messages, such as follows-

    “Err https://security.ubuntu.com jaunty-security/main Packages
    404 Not Found [IP: 91.189.92.166 80]”

    Then, I ran –
    sudo apt-get install vim vim-scripts vim-doc vim-latexsuite vim-gui-common vim-gnome

    This gave following output –

    Reading package lists… Done
    Building dependency tree
    Reading state information… Done
    Package vim is not available, but is referred to by another package.
    This may mean that the package is missing, has been obsoleted, or
    is only available from another source
    E: Package vim has no installation candidate

    I think I am missing something here.
    Thanks in advance.

  22. Kiran – You may want to try first running only the sudo apt-get update command to fetch updated list. Then run :
    sudo apt-get install vim vim-scripts vim-doc vim-latexsuite vim-gui-common vim-gnome

    Cheers.

  23. I am getting a similar issue –
    I use following to install vim:
    sudo apt-get build-dep vim-full

    ..and get error message as follows –
    E: Could not open file /var/lib/apt/lists/in.archive.ubuntu.com_ubuntu_dists_jaunty_main_source_Sources: – open (2 No such file or directory)

    I tried your solution; that didn’t work. Help appreciated.

  24. Thank You…..!!! I recover my o.s. problem using above instruction…It was most helpful for me…

  25. I put it in and I can then successfully install one thing. After that it comes back.

  26. Finally! I have been looking for the solution for this problem for what seemed like days! Thanks!

  27. THX a lot! I was thinking of doing this but i was septic of the real need of these files…

  28. Worked like a charm!!!

    Thank you for this.

    BTW : You have some awesome Linux articles for beginners, pls continue doing that for newbies like me.

Comments are closed.