dpkg: parse error, in file '/var/lib/dpkg/available'

Asked by Jeffrey

I did apt-get install gcursor. The file downloaded into the cache and then I got this error

dpkg: parse error, in file `/var/lib/dpkg/available' near line 1134 package `login':
 `Replaces' field, invalid package name `manpag1:7.04+20070412': character `:' not allowed (only letters, digits and characters `-+._')
E: Sub-process /usr/bin/dpkg returned an error code (2)

Because of this I cannot install any new packages. How to solve this?

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu apt Edit question
Assignee:
No assignee Edit question
Solved by:
Jeffrey
Solved:
Last query:
Last reply:
Revision history for this message
Cesare Tirabassi (norsetto) said :
#1

Seems like you cache is corrupted.
Try with a sudo dpkg --clear-avail && sudo apt-get update

Revision history for this message
Jeffrey (jeff0stella) said :
#2

That is exactly what I did. I did sudo dpkg --clear-avail and the update manager did the update I believe and now I have no probs. Thanks Cesare!

Revision history for this message
Christopher Marts (ocfire271) said :
#3

Worked perfectly for me as well.

Revision history for this message
iGadget (igadget) said :
#4

Same here. An alternative would be this solution as proposed on http://ubuntuforums.org/showthread.php?t=389997 :

 sudo rm /var/lib/dpkg/available and do an aptitude update and all is good...

I would just like to ask you to use aptitude instead of apt-get, as motivated here:

http://www.pthree.org/2007/08/12/aptitude-vs-apt-get/

Thanks :)

Revision history for this message
iGadget (igadget) said :
#5

Seems like the 'solution' mentioned on the ubuntuforums doesn't work all too well (you'll get complaints about the missing 'available'-file afterwards), so I'd recommend to use Cesare's solution when this occurs (happened again to me today, and fixed again using Cesare's method) :)

Revision history for this message
Mehul J. Rajput (mehulrajput) said :
#6

I too was having the same issue and it is resolved now... thank you..

Revision history for this message
lone_deranger (joao-paulo-c) said :
#7

Thanks.
Worked fine for me too!

Revision history for this message
Ema (rimlaatar) said :
#8

When I try with the update manager I get a error ... I try with sudo dpkg --clear-avail && sudo apt-get update but the same problem still exist.. can you help me pleaz .. thanks

Atteint http://archive.canonical.com intrepid Release.gpg
Ign http://archive.canonical.com intrepid/partner Translation-fr
Atteint http://fr.archive.ubuntu.com jaunty Release.gpg
Atteint http://fr.archive.ubuntu.com jaunty/main Translation-fr
Atteint http://fr.archive.ubuntu.com jaunty/restricted Translation-fr
Atteint http://fr.archive.ubuntu.com jaunty/universe Translation-fr
Atteint http://fr.archive.ubuntu.com jaunty/multiverse Translation-fr
Atteint http://fr.archive.ubuntu.com jaunty-updates Release.gpg
Ign http://fr.archive.ubuntu.com jaunty-updates/main Translation-fr
Ign http://fr.archive.ubuntu.com jaunty-updates/restricted Translation-fr
Atteint http://archive.ubuntu.com intrepid Release.gpg
Atteint http://archive.ubuntu.com intrepid/main Translation-fr
Ign http://fr.archive.ubuntu.com jaunty-updates/universe Translation-fr
Ign http://fr.archive.ubuntu.com jaunty-updates/multiverse Translation-fr
Atteint http://archive.canonical.com intrepid Release
Atteint http://fr.archive.ubuntu.com jaunty Release
Atteint http://fr.archive.ubuntu.com jaunty-updates Release
Atteint http://archive.ubuntu.com intrepid/universe Translation-fr
Atteint http://archive.ubuntu.com intrepid/restricted Translation-fr
Atteint http://archive.ubuntu.com intrepid/multiverse Translation-fr
Atteint http://archive.ubuntu.com intrepid Release
Ign http://archive.canonical.com intrepid/partner Packages
Atteint http://fr.archive.ubuntu.com jaunty/main Packages
Atteint http://fr.archive.ubuntu.com jaunty/restricted Packages
Atteint http://fr.archive.ubuntu.com jaunty/main Sources
Atteint http://fr.archive.ubuntu.com jaunty/restricted Sources
Atteint http://fr.archive.ubuntu.com jaunty/universe Packages
Atteint http://fr.archive.ubuntu.com jaunty/universe Sources
Atteint http://fr.archive.ubuntu.com jaunty/multiverse Packages
Atteint http://fr.archive.ubuntu.com jaunty/multiverse Sources
Atteint http://archive.ubuntu.com intrepid/main Packages
Ign http://archive.canonical.com intrepid/partner Sources
Atteint http://fr.archive.ubuntu.com jaunty-updates/main Packages
Atteint http://fr.archive.ubuntu.com jaunty-updates/restricted Packages
Atteint http://fr.archive.ubuntu.com jaunty-updates/main Sources
Atteint http://fr.archive.ubuntu.com jaunty-updates/restricted Sources
Atteint http://archive.ubuntu.com intrepid/universe Packages
Atteint http://archive.ubuntu.com intrepid/restricted Packages
Atteint http://archive.ubuntu.com intrepid/multiverse Packages
Atteint http://archive.canonical.com intrepid/partner Packages
Atteint http://fr.archive.ubuntu.com jaunty-updates/universe Packages
Atteint http://fr.archive.ubuntu.com jaunty-updates/universe Sources
Atteint http://fr.archive.ubuntu.com jaunty-updates/multiverse Packages
Atteint http://fr.archive.ubuntu.com jaunty-updates/multiverse Sources
Atteint http://archive.ubuntu.com intrepid/universe Sources
Atteint http://archive.ubuntu.com intrepid/main Sources
Atteint http://archive.ubuntu.com intrepid/multiverse Sources
Atteint http://archive.ubuntu.com intrepid/restricted Sources
Atteint http://archive.canonical.com intrepid/partner Sources
Lecture des listes de paquets... Erreur !
E: Problem parsing dependency Replaces
E: Erreur apparue lors du traitement de transmission-gtk (NewVersion1)
E: Problem with MergeList /var/lib/apt/lists/fr.archive.ubuntu.com_ubuntu_dists_jaunty_main_binary-i386_Packages
E: Les listes de paquets ou le fichier « status » ne peuvent être analysés ou lus.

Revision history for this message
alexeepc (alessandrobellafiore) said :
#9

Hi,
I've downloaded packages updates with synaptic.
During installation something didn't worked and now I've many troubles.
Among those when I tray opening synaptic an error message pop-up

E: dpkg was interrupted, you must manually run 'dpkg --configure -a' to correct the problem."

Well, I tried doing it but it doesn't work and I receive as answer:

dpkg: parse error, in file `/var/lib/dpkg/updates/0019' near line 1:
 newline in field name `#padding'

I tried with dpkg --clear -avail but it doesn't accept --clear.
I tried with apt-get update; it looks as downloading but at the end the result is:

W: GPG error: http://http.us.debian.org stable Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 9AA38DCD55BE302B NO_PUBKEY 4D270D06F42584E6
E: dpkg was interrupted, you must manually run 'dpkg --configure -a' to correct the problem.

I'm quite disoriented, what do you suggest????
Thank you :)

Revision history for this message
marcobra (Marco Braida) (marcobra) said :
#10

@alexeepc

Please don't append a new question on a already answered or marked as solved question.
Please make new question from here: https://answers.launchpad.net/ubuntu/+addquestion
you will get better chance to get right answer on a fresh tagged "open" question.
Solved or answered questions are usually not read from answering people.

Thank you