I keep having an error installing / updating / basically doing anything that concerns packages. I am trying to get an I2C library going and I can't get sudo-apt-get install i2c-tools to work from a failing dpkg.
The error code I am getting is:
dpkg: unrecoverable fatal error, aborting:
files list for package 'libcap2:armf' is missing final newline
e: sub-process /user/bin/dpkg return an error code (2)
Whenever I try sudo apt-get remove libcap2:armf (or libcap2-bin) it begins, but when I select Y to complete it throws up a dpkg error for libcap2:armf... I can't remove it all the way because whatever it's doing is dependent on this?
Is there any way to recover from this? Otherwise I have to move my pi to a fresh OS and reconfigure it all (as I unfortunately did not take an established backup).
Once I removed libcap2:armhf, I had to remove 2 more entries for the same fault, then I was able to get to a different place.
I am currently following the error up with (from sudo apt upgrade) Errors were encountered while processing: /var/cache/apt/archives/lib.... /var/cache/apt/archives/rpcbind...
– Ricky Layman May 04 '18 at 19:59fsck
should be run at boot if the system was not shut down cleanly -- have you noticed this take extra time? I'd take the card out and run that on a separate (linux or otherwise posix ext fs capable) system, although at this point it may not say much since the damage and (probably) an attempt to fix it has already been done. – goldilocks May 05 '18 at 12:38/lost+found
directory. The lesson here is that you should keep a decent backup ;) https://raspberrypi.stackexchange.com/a/5492/5538 It is not hard once you get the hand of it. – goldilocks May 05 '18 at 12:38