I was installing a package from source and checkinstall produced
dpkg:error: reading package info file '/usr/local/var/lib/dpkg/status': Is a directory
The "status" directory was missing i went and made the directory but dont know how to make the info file. I may have some backups but not sure which one to use. From what i've been reading I think dpkg has been corrupted sort of.
phantom@AsusK53E:~$ tree -d /usr/local/var/lib/dpkg
/usr/local/var/lib/dpkg
├── alternatives
├── info
├── methods
│ ├── disk
│ ├── floppy
│ ├── ftp
│ ├── mnt
│ └── multicd
├── parts
├── status
└── updates
11 directories
Copied the status and availalbe files from /var/lib/dpkg to /usr/local/var/lib/dpkg and the checkinstall completed without error.
Just creating a directory called status won't get you what you need. /var/lib/dpkg/status is supposed to be a file, not a directory as seen below:
Provided all you've done wrong is delete the status file and attempt to replace it with a directory you should be able to simply issue the following commands:
rmdir /var/lib/dpkg/status
sudo cp /var/lib/dpkg/status-old /var/lib/dpkg/status
if you've somehow managed to move the entire /var/lib/dpkg branch and graft it to the /usr/local branch you'll need to move it back first.
the
/var/lib/dpkg
branch typically looks like this:Source: shamelessly modified from this answer to this question.