dpkg: error: reading package info file /usr/local/var/lib/dpkg/status

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP








up vote
0
down vote

favorite












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.







share|improve this question


















  • 2




    You did something wrong, usually DPKG-cache is located in top-level - /var/lib/dpkg/status. And deb-files created with checkinstall are saved to this database. Please add output of tree -d /usr/local/var/lib/dpkg to the question.
    – N0rbert
    May 26 at 9:30














up vote
0
down vote

favorite












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.







share|improve this question


















  • 2




    You did something wrong, usually DPKG-cache is located in top-level - /var/lib/dpkg/status. And deb-files created with checkinstall are saved to this database. Please add output of tree -d /usr/local/var/lib/dpkg to the question.
    – N0rbert
    May 26 at 9:30












up vote
0
down vote

favorite









up vote
0
down vote

favorite











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.







share|improve this question














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.









share|improve this question













share|improve this question




share|improve this question








edited May 26 at 21:03

























asked May 25 at 22:28









m0ng00se

86




86







  • 2




    You did something wrong, usually DPKG-cache is located in top-level - /var/lib/dpkg/status. And deb-files created with checkinstall are saved to this database. Please add output of tree -d /usr/local/var/lib/dpkg to the question.
    – N0rbert
    May 26 at 9:30












  • 2




    You did something wrong, usually DPKG-cache is located in top-level - /var/lib/dpkg/status. And deb-files created with checkinstall are saved to this database. Please add output of tree -d /usr/local/var/lib/dpkg to the question.
    – N0rbert
    May 26 at 9:30







2




2




You did something wrong, usually DPKG-cache is located in top-level - /var/lib/dpkg/status. And deb-files created with checkinstall are saved to this database. Please add output of tree -d /usr/local/var/lib/dpkg to the question.
– N0rbert
May 26 at 9:30




You did something wrong, usually DPKG-cache is located in top-level - /var/lib/dpkg/status. And deb-files created with checkinstall are saved to this database. Please add output of tree -d /usr/local/var/lib/dpkg to the question.
– N0rbert
May 26 at 9:30










1 Answer
1






active

oldest

votes

















up vote
1
down vote



accepted










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:



ll /var/lib/dpkg/status
-rw-r--r-- 1 root root 3466281 May 26 06:17 /var/lib/dpkg/status


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:



tree -d /var/lib/dpkg
/var/lib/dpkg
├── alternatives
├── info
├── parts
├── triggers
└── updates


Source: shamelessly modified from this answer to this question.






share|improve this answer






















  • /var/lib/dpkg/status is present. The error from checkinstall shows the file is missing from this path usr/local/var/lib/dpkg/status
    – m0ng00se
    May 26 at 20:13











  • cp the status-old to /usr/local/var/lib/dpkg/status it checkinstall completed without error
    – m0ng00se
    May 26 at 20:58










  • @m0ng00se I'm glad my answer was helpful to you! Cheers!
    – Elder Geek
    May 31 at 16:24










  • @ElderGeek, How to move it back to /var/lib/dpkg if I accidentally managed it to /usr/local. I already create new dir in /var/lib/dpkg, but it still gives me error when installing software: update-alternatives: error: cannot append to '/usr/local/var/log/alternatives.log': No such file or directory.
    – bagustris
    Aug 8 at 0:22










  • @bagustris If you have a different question feel free to ask and link to this one if you feel it provides context. There are many answers here on how to move a file.
    – Elder Geek
    Aug 9 at 15:15










Your Answer







StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "89"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);








 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1040426%2fdpkg-error-reading-package-info-file-usr-local-var-lib-dpkg-status%23new-answer', 'question_page');

);

Post as a guest






























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
1
down vote



accepted










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:



ll /var/lib/dpkg/status
-rw-r--r-- 1 root root 3466281 May 26 06:17 /var/lib/dpkg/status


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:



tree -d /var/lib/dpkg
/var/lib/dpkg
├── alternatives
├── info
├── parts
├── triggers
└── updates


Source: shamelessly modified from this answer to this question.






share|improve this answer






















  • /var/lib/dpkg/status is present. The error from checkinstall shows the file is missing from this path usr/local/var/lib/dpkg/status
    – m0ng00se
    May 26 at 20:13











  • cp the status-old to /usr/local/var/lib/dpkg/status it checkinstall completed without error
    – m0ng00se
    May 26 at 20:58










  • @m0ng00se I'm glad my answer was helpful to you! Cheers!
    – Elder Geek
    May 31 at 16:24










  • @ElderGeek, How to move it back to /var/lib/dpkg if I accidentally managed it to /usr/local. I already create new dir in /var/lib/dpkg, but it still gives me error when installing software: update-alternatives: error: cannot append to '/usr/local/var/log/alternatives.log': No such file or directory.
    – bagustris
    Aug 8 at 0:22










  • @bagustris If you have a different question feel free to ask and link to this one if you feel it provides context. There are many answers here on how to move a file.
    – Elder Geek
    Aug 9 at 15:15














up vote
1
down vote



accepted










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:



ll /var/lib/dpkg/status
-rw-r--r-- 1 root root 3466281 May 26 06:17 /var/lib/dpkg/status


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:



tree -d /var/lib/dpkg
/var/lib/dpkg
├── alternatives
├── info
├── parts
├── triggers
└── updates


Source: shamelessly modified from this answer to this question.






share|improve this answer






















  • /var/lib/dpkg/status is present. The error from checkinstall shows the file is missing from this path usr/local/var/lib/dpkg/status
    – m0ng00se
    May 26 at 20:13











  • cp the status-old to /usr/local/var/lib/dpkg/status it checkinstall completed without error
    – m0ng00se
    May 26 at 20:58










  • @m0ng00se I'm glad my answer was helpful to you! Cheers!
    – Elder Geek
    May 31 at 16:24










  • @ElderGeek, How to move it back to /var/lib/dpkg if I accidentally managed it to /usr/local. I already create new dir in /var/lib/dpkg, but it still gives me error when installing software: update-alternatives: error: cannot append to '/usr/local/var/log/alternatives.log': No such file or directory.
    – bagustris
    Aug 8 at 0:22










  • @bagustris If you have a different question feel free to ask and link to this one if you feel it provides context. There are many answers here on how to move a file.
    – Elder Geek
    Aug 9 at 15:15












up vote
1
down vote



accepted







up vote
1
down vote



accepted






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:



ll /var/lib/dpkg/status
-rw-r--r-- 1 root root 3466281 May 26 06:17 /var/lib/dpkg/status


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:



tree -d /var/lib/dpkg
/var/lib/dpkg
├── alternatives
├── info
├── parts
├── triggers
└── updates


Source: shamelessly modified from this answer to this question.






share|improve this answer














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:



ll /var/lib/dpkg/status
-rw-r--r-- 1 root root 3466281 May 26 06:17 /var/lib/dpkg/status


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:



tree -d /var/lib/dpkg
/var/lib/dpkg
├── alternatives
├── info
├── parts
├── triggers
└── updates


Source: shamelessly modified from this answer to this question.







share|improve this answer














share|improve this answer



share|improve this answer








edited May 30 at 11:35

























answered May 26 at 17:28









Elder Geek

25.2k948119




25.2k948119











  • /var/lib/dpkg/status is present. The error from checkinstall shows the file is missing from this path usr/local/var/lib/dpkg/status
    – m0ng00se
    May 26 at 20:13











  • cp the status-old to /usr/local/var/lib/dpkg/status it checkinstall completed without error
    – m0ng00se
    May 26 at 20:58










  • @m0ng00se I'm glad my answer was helpful to you! Cheers!
    – Elder Geek
    May 31 at 16:24










  • @ElderGeek, How to move it back to /var/lib/dpkg if I accidentally managed it to /usr/local. I already create new dir in /var/lib/dpkg, but it still gives me error when installing software: update-alternatives: error: cannot append to '/usr/local/var/log/alternatives.log': No such file or directory.
    – bagustris
    Aug 8 at 0:22










  • @bagustris If you have a different question feel free to ask and link to this one if you feel it provides context. There are many answers here on how to move a file.
    – Elder Geek
    Aug 9 at 15:15
















  • /var/lib/dpkg/status is present. The error from checkinstall shows the file is missing from this path usr/local/var/lib/dpkg/status
    – m0ng00se
    May 26 at 20:13











  • cp the status-old to /usr/local/var/lib/dpkg/status it checkinstall completed without error
    – m0ng00se
    May 26 at 20:58










  • @m0ng00se I'm glad my answer was helpful to you! Cheers!
    – Elder Geek
    May 31 at 16:24










  • @ElderGeek, How to move it back to /var/lib/dpkg if I accidentally managed it to /usr/local. I already create new dir in /var/lib/dpkg, but it still gives me error when installing software: update-alternatives: error: cannot append to '/usr/local/var/log/alternatives.log': No such file or directory.
    – bagustris
    Aug 8 at 0:22










  • @bagustris If you have a different question feel free to ask and link to this one if you feel it provides context. There are many answers here on how to move a file.
    – Elder Geek
    Aug 9 at 15:15















/var/lib/dpkg/status is present. The error from checkinstall shows the file is missing from this path usr/local/var/lib/dpkg/status
– m0ng00se
May 26 at 20:13





/var/lib/dpkg/status is present. The error from checkinstall shows the file is missing from this path usr/local/var/lib/dpkg/status
– m0ng00se
May 26 at 20:13













cp the status-old to /usr/local/var/lib/dpkg/status it checkinstall completed without error
– m0ng00se
May 26 at 20:58




cp the status-old to /usr/local/var/lib/dpkg/status it checkinstall completed without error
– m0ng00se
May 26 at 20:58












@m0ng00se I'm glad my answer was helpful to you! Cheers!
– Elder Geek
May 31 at 16:24




@m0ng00se I'm glad my answer was helpful to you! Cheers!
– Elder Geek
May 31 at 16:24












@ElderGeek, How to move it back to /var/lib/dpkg if I accidentally managed it to /usr/local. I already create new dir in /var/lib/dpkg, but it still gives me error when installing software: update-alternatives: error: cannot append to '/usr/local/var/log/alternatives.log': No such file or directory.
– bagustris
Aug 8 at 0:22




@ElderGeek, How to move it back to /var/lib/dpkg if I accidentally managed it to /usr/local. I already create new dir in /var/lib/dpkg, but it still gives me error when installing software: update-alternatives: error: cannot append to '/usr/local/var/log/alternatives.log': No such file or directory.
– bagustris
Aug 8 at 0:22












@bagustris If you have a different question feel free to ask and link to this one if you feel it provides context. There are many answers here on how to move a file.
– Elder Geek
Aug 9 at 15:15




@bagustris If you have a different question feel free to ask and link to this one if you feel it provides context. There are many answers here on how to move a file.
– Elder Geek
Aug 9 at 15:15












 

draft saved


draft discarded


























 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1040426%2fdpkg-error-reading-package-info-file-usr-local-var-lib-dpkg-status%23new-answer', 'question_page');

);

Post as a guest













































































Popular posts from this blog

pylint3 and pip3 broken

Missing snmpget and snmpwalk

How to enroll fingerprints to Ubuntu 17.10 with VFS491