#Raspberry Pi OS dpkg error

1 messages · Page 1 of 1 (latest)

swift ingot
#

First error:
"dpkg: unrecoverable fatal error, aborting: files list file for package 'rpicam-apps' is missing final newline"
This error initially only affected rpicam-apps. When I googled the fix and followed instructions for how to fix the missing final newline error, the issue was not resolved and spread to include libc6:armhf and libmd0:armhf. The instructions I followed to try and fix the rpicam-apps error included moving all the rpicam-apps files to a different location and reconfiguring, updating, and upgrading with sudo apt.

/var/lib/dpkg/info contains no files named rpicam-apps.[any extension], because these were removed in the initial attempt to fix the error. I have these backed up.
/var/lib/dpkg/info contains no files named libc6:armhf.[any extension]. These are nowhere to be found.
/var/lib/dpkg/info contains all files the files it should with the name libmd0:armhf.[any extension], including .list, .md5sums, .shlibs, .symbols, and .triggers.

I am on a Raspberry Pi 5 which uses arm64 instead of armhf, so libc6:arm64 files are present as well. These do not have any errors.

clever coral
# swift ingot First error: "dpkg: unrecoverable fatal error, aborting: files list file for pa...

Huh, that sucks. Anyways here's what Chatgpt had to say:

It sounds like the initial attempt to fix the missing newline error may have unintentionally altered the state of the dpkg database, especially since critical files for libc6:armhf are now missing. Here’s a step-by-step approach to address this:

  1. Restore the Backup: First, restore the backup of the removed rpicam-apps files in /var/lib/dpkg/info. Ensure that they are named correctly, as this directory structure is essential for dpkg to function properly.

  2. Reconfigure Packages:

sudo dpkg --configure -a

  1. Force Reinstallation of Affected Packages:

For libc6:armhf and libmd0:armhf, use:

sudo apt-get install --reinstall libc6:armhf libmd0:armhf

  1. Update Package Lists:

sudo apt update

  1. Install or Remove rpicam-apps:

Attempt to install rpicam-apps:

sudo apt install rpicam-apps

If the installation still fails, try purging it completely:

sudo apt purge rpicam-apps

  1. Check for Errors: If issues persist, verify the state of your dpkg database by running:

dpkg --audit

  1. Confirm armhf Compatibility: Since you’re on a Raspberry Pi 5 (arm64), double-check that you need armhf versions for these packages. Some armhf libraries might be needed if you're running 32-bit applications, but if not, you might avoid the issue by focusing solely on arm64 packages.
swift ingot
#

i'll try those after dinner

swift ingot
#

I've tried chatGPT 4o myself and it seems i'm gonna need a real human to help me with this