broken /var/lib/dpkg/status

Archived topics about LMDE 1 and LMDE 2
Locked
LoneStar

broken /var/lib/dpkg/status

Post by LoneStar »

Gents,
It would seem that my /var/lib/dpkg/status is broken which means I cannot update :-(
Can anyone give me a helping hand at fixing it?

here's the error I get:

Code: Select all

Traceback (most recent call last):
  File "/usr/bin/apt-listchanges", line 237, in <module>
    main()
  File "/usr/bin/apt-listchanges", line 72, in main
    status.readfile('/var/lib/dpkg/status')
  File "/usr/share/apt-listchanges/DebianFiles.py", line 105, in readfile
    self.stanzas += [ControlStanza(x) for x in open(file, 'r').read().split('\n\n') if x]
  File "/usr/share/apt-listchanges/DebianFiles.py", line 64, in __init__
    field, value = line.split(':', 1)
ValueError: need more than 1 value to unpack
dpkg: parse error, in file '/var/lib/dpkg/status' near line 39951 package 'libnm-glib-vpn1':
 field name `
E: Sub-process /usr/bin/dpkg returned an error code (2)
Thanks in advance ...
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
richyrich

Re: broken /var/lib/dpkg/status

Post by richyrich »

These terminal commands should cleanup and reconfigure your package database. (after the sudo su you will need to type in your password, just copy/paste each separate line into the terminal)

Code: Select all

sudo su
apt-get -y autoremove && aptitude -y autoclean && aptitude -y clean && dpkg --configure -a && aptitude update
good luck.
LoneStar

Re: broken /var/lib/dpkg/status

Post by LoneStar »

@rickyrich,
Thanks for the quick response - but alas the same error-message as above ... (happened allready under 'apt-get -y autoremove')
richyrich

Re: broken /var/lib/dpkg/status

Post by richyrich »

Code: Select all

dpkg: parse error, in file '/var/lib/dpkg/status' near line 39951 package 'libnm-glib-vpn1':
field name `
not sure, but looks like something to do with a vpn library ? I'm in Mint 9 Xfce at the moment, and it doesn't even show up in Synaptic ?
LoneStar

Re: broken /var/lib/dpkg/status

Post by LoneStar »

*sigh* yup - and I looked up the status-file - side-by-side of one from another of my machines (running exactly the same - infact, I keep'em sync'ed) and I certainly could not _see_ any difference whatsoever ...

The darned thing is - whatever I try to do sysadm-wise - I'm now being snookered by the same error which causes 'dpkg' to abort.

The only thing I can think of (though I shudder to do it) is to copy that particular entry from one machine to another (cant do the whole file 'cuz their h/w is somewhat different) - obviously after backing up the statusfile *chuckles* - and see if that helps any.
Or - extract the same entry from the two machines and run a 'diff' on them ...

Oh - and about not showing up in synaptic - it's a dependency for the network-manager package ... you would never find it on its own in a packet manager ...
rck2
Level 1
Level 1
Posts: 16
Joined: Fri May 10, 2013 8:02 am
Location: South Carolina

Re: broken /var/lib/dpkg/available

Post by rck2 »

Had the following error when trying to install a new package
actually it was as follows :

sudo apt-get install gnucash

Extracting templates from packages: 100%
dpkg: warning: parsing file '/var/lib/dpkg/available' near line 24416 package 'net-tools':
`Conflicts' field, reference to `ja-trans':
`<' is obsolete, use `<=' or `<<' instead
dpkg: error: parsing file '/var/lib/dpkg/available' near line 24416 package 'net-tools':
`Conflicts' field, reference to `ja-trans': version contains ` '
E: Sub-process /usr/bin/dpkg returned an error code (2)
A package failed to install. Trying to recover:


So I don't know if this was cool or not but I remove the following line 24416 " Conflicts: ja-trans (<9 0.8-2)" using vim ,
then issued
dpkg --configure -a
then issed the command
sudo apt-get install gnucash
It installed. Its working.

Anybody got any thoughts?
Locked

Return to “LMDE Archive”