dpkg error, what to do about it?

Jan 25, 2025 Last reply: 1 year ago 2 Replies

I just installed pigpiod in a Pi 4B and got the following error:-



root@homepi# apt install pigpiod Reading package lists... Done Building dependency tree... Done Reading state information... Done The following additional packages will be installed: libpigpio1 The following NEW packages will be installed: libpigpio1 pigpiod 0 upgraded, 2 newly installed, 0 to remove and 2 not upgraded. Need to get 99.4 kB of archives. After this operation, 331 kB of additional disk space will be used. Do you want to continue? [Y/n] y Get:1

formatting link
bookworm/main arm64 libpigpio1 arm64 1.79-1+rpt1 [89.2 kB] Get:2
formatting link
bookworm/main arm64 pigpiod arm64 1.79-1+rpt1 [10.3 kB] Fetched 99.4 kB in 0s (800 kB/s) Selecting previously unselected package libpigpio1. dpkg: unrecoverable fatal error, aborting: files list file for package 'libasyncns0:arm64' is missing final newline E: Sub-process /usr/bin/dpkg returned an error code (2) root@homepi#



That looks a bit worrying. It feels as if maybe some sort of clear out and re-installation might clear things up, but I'm not quite sure what.


Looks to me like an error in the package files.

"files list file for package 'libasyncns0:arm64' is missing final newline"

Seems pretty conclusive

Contact the upstream maintainer

The fix turns out to be fairly simple. You go and find the file which has the missing newline (probably due to an interrupted download or some such) and remove it. The dpkg files in question are in directory /var/lib/dpkg/info. Once removed simply 'apt reinstall' the package and all is well again.

I found the solution on an ubuntu list.

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required