Var lib dpkg available updating

So I overwrite it with the availaible-old file and it fixed it !

All I've done post-install is configure networking, add a ppa, update the apt-cache and dist-upgrade. Now I am running a script we have to configure MAAS for Certification and discovered a part that does a dpkg query is failing.

On further digging, it looks like dpkg is not able to properly query the database.

var lib dpkg available updating-83var lib dpkg available updating-34var lib dpkg available updating-4

#apt-get update Fetched 26.5 MB in 3min 1s (146 k B/s) Output directory /var/lib/debtags/ does not exist Reading package lists... E: fl Abs Path on /var/lib/dpkg/status failed - realpath (2: No such file or directory) E: Could not open file - open (2: No such file or directory) E: Problem opening E: The package lists or status file could not be parsed or opened.

Please only create a NEW question at if you do not have an open question about this issue yet.

dpkg: warning: parsing file '/var/lib/dpkg/status' near line 11928 package 'libmagic1': missing maintainer dpkg: error: failed to open package info file `/var/lib/dpkg/available' for reading: No such file or directory Error in function: dpkg: warning: parsing file '/var/lib/dpkg/status' near line 11928 package 'libmagic1': missing maintainer Any suggestions for fixing it? p=80 suggests this could be due to another package manager (e.g.

If you can't find running one try rebooting to clear this (in case of a leftover process).

If you don't know everything you installed, reinstall the system. Apt will download the archives but stall at installing them due to some missing directories in /var/. you will be prompted about logrotate configuration and a few other configurations just type Y n proceed till the end then reboot when apt dist-upgrade is finished. If you bought a raspberry pi 3 and you faced the issue and getting the error "could not open file /var/lib/dpkg/status parsed or opened" this is a workaround that worked for me: How to recreate "/var/lib/dpkg/status" file?