broken /var/lib/dpkg/status

Post your update and upgrade related errors here
Forum rules
Before you post please read how to get help

broken /var/lib/dpkg/status

Postby LoneStar on Wed Feb 23, 2011 2:48 am

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 ...
LoneStar
Level 1
Level 1
 
Posts: 27
Joined: Fri May 21, 2010 2:02 pm

Linux Mint is funded by ads and donations.
 

Re: broken /var/lib/dpkg/status

Postby richyrich on Wed Feb 23, 2011 2:59 am

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.
User avatar
richyrich
Level 13
Level 13
 
Posts: 4766
Joined: Mon May 04, 2009 8:31 pm
Location: Somewhere in northern Saskatchewan, Canada

Re: broken /var/lib/dpkg/status

Postby LoneStar on Wed Feb 23, 2011 3:21 am

@rickyrich,
Thanks for the quick response - but alas the same error-message as above ... (happened allready under 'apt-get -y autoremove')
LoneStar
Level 1
Level 1
 
Posts: 27
Joined: Fri May 21, 2010 2:02 pm

Re: broken /var/lib/dpkg/status

Postby richyrich on Wed Feb 23, 2011 3:26 am

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 ?
User avatar
richyrich
Level 13
Level 13
 
Posts: 4766
Joined: Mon May 04, 2009 8:31 pm
Location: Somewhere in northern Saskatchewan, Canada

Re: broken /var/lib/dpkg/status

Postby LoneStar on Wed Feb 23, 2011 11:39 am

*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 ...
LoneStar
Level 1
Level 1
 
Posts: 27
Joined: Fri May 21, 2010 2:02 pm

Re: broken /var/lib/dpkg/status

Postby richyrich on Thu Feb 24, 2011 9:18 pm

User avatar
richyrich
Level 13
Level 13
 
Posts: 4766
Joined: Mon May 04, 2009 8:31 pm
Location: Somewhere in northern Saskatchewan, Canada

Re: broken /var/lib/dpkg/available

Postby rck2 on Thu Jul 04, 2013 5:50 pm

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?
rck2
Level 1
Level 1
 
Posts: 16
Joined: Fri May 10, 2013 8:02 am
Location: South Carolina

Linux Mint is funded by ads and donations.
 

Return to Update/Upgrade Issues

Who is online

Users browsing this forum: No registered users and 5 guests