Tell me more ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Good evening. This problem occured when trying to update using the update manager. A problem occured so I cleared all the cache and tried to update once again this time in terminal, and it spat out:

dpkg: error: parsing file '/var/lib/dpkg/status' near line 6449
missing package name

After opening up 'status' with gedit and going to line 6449, I found that nothing was on that line but the following was before and after it.

This package contains the Mono System.Configuration library for CLI 4.0.
Original-Maintainer: Debian Mono Group <pkg-mono-group@lists.al)oth.debian.org>
Homepage: http://www.mono-project.com/
                                                   <<<<---- LINE 6449
Package: bzip2
Status: install ok installed
Priority: optional
Section: utils
Installed-Size: 160
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>

<<<<--- LINE 6449 is obviously not on the file, but I can't see whats wrong here? anybody have an idea?

Thanks!

Edit: I have tried running:

sudo apt-get install --fix-missing
sudo dpkg --clear-avail

But no good...

share|improve this question
1  
please check this Q&A and see if it resolves your question. thanks. askubuntu.com/questions/4834/… – fossfreedom Mar 4 '12 at 18:52

1 Answer

I would try

sudo apt-get update
sudo apt-get autoclean
sudo apt-get clean
sudo apt-get autoremove

Then

sudo apt-get -f install

sudo dpkg --configure -a

If for some reason the file /var/lib/dpkg/available is damaged.

Move it away, for example with

sudo mv /var/lib/dpkg/available /var/lib/dpkg/available.bak

If there is a file /var/lib/dpkg/available-old try if this one works:

sudo cp /var/lib/dpkg/available-old /var/lib/dpkg/available

If installing software works now you are done.

If it still doesn't work run

sudo rm /var/lib/dpkg/available 
sudo sudo touch /var/lib/dpkg/available  
sudo sh -c 'for i in /var/lib/apt/lists/*_Packages; do dpkg --merge-avail "$i"; done'

to create a new file.

share|improve this answer
Thanks for the reply but it failed on sudo apt-get autoremove chu@chu-pc:~$ sudo apt-get autoremove Reading package lists... Done Building dependency tree Reading state information... Done 0 upgraded, 0 newly installed, 0 to remove and 91 not upgraded. 1 not fully installed or removed. After this operation, 0 B of additional disk space will be used. dpkg: error: parsing file '/var/lib/dpkg/status' near line 6449: missing package name E: Sub-process /usr/bin/dpkg returned an error code (2) – mpole Mar 4 '12 at 19:05
"sudo dpkg --clear-avail" and then "sudo apt-get update" – Ringtail Mar 4 '12 at 19:17

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.