How To Fix “Problem with MergeList /var/lib/apt/lists” Error In Ubuntu 11.04

Written by admin. Posted in Linux, Mint, Ubuntu

Tagged: , , , , , ,

Published on May 01, 2011 with 71 Comments">71 Comments

FacebookTwitterStumbleUponPinterestTumblrEmailGoogle+PrintShare

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.

 

FacebookTwitterStumbleUponPinterestTumblrEmailGoogle+PrintShare
  • Mike

    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.

  • http://ihaveapc.com admin

    Mike – You are welcome and yes please stay tuned for lots of upcoming cool stuff here. :)

  • headr

    i try many times.but it still wont work :(

  • http://ihaveapc.com admin

    headr – What’s the error you see after running the commands mentioned ?

  • Raja Mahesh Kumar

    It work fine tyvm

  • ben

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

  • zethy

    Thanks, worked for me!

  • Aku

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

  • alldine

    working 100%, thanks dude… you safe my ubuntu life.. :)

  • gerber

    thank you , very good works fine, the only thing i dont know what happens

  • davido

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

  • ahag

    Thanks, worked for me toooooo!

  • glenn

    Thank you, Worked like a charm!

  • Aras

    worked for me as well. thanks a lot!

  • Ben

    WOW works perfect Thanks

  • Tharindu

    Nice, This work for me, Thanks

  • http://www.flightsafety.com steampack26

    works great. thank you…you are the gentlemen of scholar!

  • http://blog.deadman.ir DeadMan

    Thanks so much.
    it works for me but after installing some packages the error came back!!!

    • http://ihaveapc.com admin

      @DeadMan – You can try cleaning the apt cache and again running the commands.

  • Chris

    Thanks so much!

  • Dattatray Gund

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

  • Pingback: Linux Mint / Ubuntu Shell Script To Fix Problem with MergeList /var/lib/apt/lists”

  • NIke

    Niiiiice ..
    thank you… bookmarked!

  • evanp

    wow thankyou! it works!

  • vinod

    Thank u very much !!

  • John Lindsey

    This worked great. Thanks!!!!!!!!!!!!!!!!!!!

  • Pradeep

    God bless you.

  • Manjunath

    Thanku its working

  • Kiran

    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.

  • http://ihaveapc.com admin

    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.

  • Kiran

    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 http://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.

    • http://ihaveapc.com admin

      Hi Kiran,
      Try this -
      sudo apt-get install texlive-full vim
      Regards,
      admins

  • Brandon Garcia

    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.

  • http://kreasirijaal.blogspot.com rijaalfa

    nice, it’s work on me. thanks.

  • Claudio leturia

    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,]

  • Jesmag2381

    WORKS LIKE PERFECT!! THANKS FOR THE HELP….

  • Beneschk

    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?

    • Beneschk

      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

      • http://ihaveapc.com admin

        Beneschk – Many thanks for sharing your solution.

        Cheers.

  • Joshua

    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..

    • http://ihaveapc.com admin

      Can you please post the exact error?

  • Joshua

    THIS :: >> W: GPG error: http://security.ubuntu.com natty-security InRelease: The following signatures were invalid: NODATA 1 NODATA 2
    W: GPG error: http://archive.canonical.com natty InRelease: The following signatures were invalid: NODATA 1 NODATA 2
    W: GPG error: http://extras.ubuntu.com natty InRelease: The following signatures were invalid: NODATA 1 NODATA 2
    W: GPG error: http://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.

    • http://ihaveapc.com admin

      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

      • Joshua

        ok i jus did what u advised and i got the same error…

  • http://debtcreditx.info/ Mac

    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!

  • Uranela

    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?

  • Uranela

    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?

  • Elizer

    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.

  • Lars

    Thanks. It worked!

  • icofriend

    Thanks for the solution. So very good

  • http://www.hindmaratha.com Maratha

    Hey..

    Really Thanks for sharing this best solution.. its works for me and happy while writing this reply.. Thanks once again..

  • William

    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.

  • http://ihaveapc.com admin

    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.

  • Mahesh

    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 http://old-releases.ubuntu.com/ubuntu/dists/oneiric/universe/binary-amd64/Packages 404 Not Found
    W: Failed to fetch http://old-releases.ubuntu.com/ubuntu/dists/oneiric/universe/binary-i386/Packages 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.

  • http://ihaveapc.com admin

    @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

  • Giovanni

    Wonderful! It worked instantly. Thanks for this tip. Peace.

  • Fixxxer

    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″;

  • Evan Wiranatha

    Thanks, It worked, two thumbs up and…. you rock

  • http://www.cemtercume.com tercüme bürosu

    Works very good. Nice fixing..

  • http://www.ihaveapc.com nada sadki

    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 analysés ou lus.

  • yangyang

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

  • freddong353

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

  • Heike Funk

    solved the Thanks this solved the problem :)

  • mauro

    Tks so much! easy and quick!
    bests

  • yudhaejr

    thanks alot its work..

  • Artur

    Hey dude, thank you…

  • Marco Antonio

    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.

  • gabriele

    thanks a lot, worked fine!

  • Rob knol

    fixed on a mint linux nada laptop
    thanks!

  • Michael

    Hi im not much of a computer whiz but what is the terminal?

    • Valene

      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.

  • Valene

    Thanks! this helped me out.