LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   /var/lib/dpkg/status corrupted (https://www.linuxquestions.org/questions/linux-newbie-8/var-lib-dpkg-status-corrupted-912210/)

irahkob 11-06-2011 02:39 PM

/var/lib/dpkg/status corrupted
 
Hello. I tried installing wine and while doing so there was a power failure. Now i cannot install/update any software either from add/remove or synaptic tool. The error i get is
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.
E: _cache->open() failed, please report.
trying a few sudo commands in terminal helped me identify it as a syntax error in status line 1. But how to correct that? I cannot edit the status or status-old file whatsoever due to some permission problems although i am very much the owner.
using ubuntu 8.10
Please help. God bless you

bigrigdriver 11-06-2011 05:07 PM

I'm a fairly recent convert to Debian, having spent most of the last twelve years on .rpm based distros, so please take my advice with caution.

In reading your post, I note that synaptic is having trouble with the status list of available packages.
Quote:

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.
E: _cache->open() failed, please report.
So, a two-step solution may help, using dpkg (the low-level packagement application that Synaptic calls on to do it's magic).

First, rebuild the list of available packages. Open a terminal, and, as root,
Code:

dpkg --update-avail /var/lib/dpkg/available
Then repair the broken status file.
Code:

dpkg --merge-available /var/lib/dpkg/status
Note that the *available* and *status* files I've listed are from my Debian 6.0 installation. You should use the Ubuntu paths to those files.

I hope this works for you.
__________________

colucix 11-06-2011 05:40 PM

Please post your thread in only one forum. Posting a single thread in the most relevant forum will make it easier for members to help you and will keep the discussion in one place. This thread is being closed because it is a duplicate. Please continue here: http://www.linuxquestions.org/questi...working-912217


All times are GMT -5. The time now is 02:24 PM.