Unable to install any packages due to unrecoverable fatal error /var/lib/dpkg/diversions

Posted by gforces on Ask Ubuntu See other posts from Ask Ubuntu or by gforces
Published on 2012-01-31T00:24:46Z Indexed on 2012/11/08 11:23 UTC
Read the original article Hit count: 393

Filed under:
|

I am currently unable to install any packages. I receive the following error:

 dpkg: unrecoverable fatal error, aborting:
 too-long line or missing newline in `/var/lib/dpkg/diversions

I have tried various approaches:

sudo dpkg --configure -a   
sudo apt-get clean
sudo dpkg-divert --list 
sudo apt-get check  
sudo apt-get install -f

etc. but all to no avail. Either the output was apparently normal or the error above was thrown.

I'm stumped as to how to proceed and would appreciate any assistance. If any further info is required just ask.


Thanks for the reply. I followed the suggestions and am now getting a different error:

(Reading database ... 50%dpkg: unrecoverable fatal error, aborting: files list file for package 'libksane0' is missing final newline E: Sub-process /usr/bin/dpkg returned an error code (2)

Here is the link for the current diversions: http://paste.ubuntu.com/823500/ and the old broken one: http://paste.ubuntu.com/823502/

I tried to reinstall libksane0 but the same error occurred.

© Ask Ubuntu or respective owner

Related posts about package-management

Related posts about dpkg