Score:1

dpkg: error: failed to open package info file '/var/lib/dpkg/available' for reading: No such file or directory

ug flag

I was uninstalling a software in Ubuntu(20.04), and I got these error

dpkg: error: failed to open package info file '/var/lib/dpkg/available' for reading: No such file or directory
E: Sub-process dpkg --set-selections returned an error code (2)
E: Couldn't record the approved state changes as dpkg selection states
nobody avatar
gh flag
Try `sudo dpkg --clear-avail && sudo apt update`
N0rbert avatar
zw flag
I suppose you have severe file system damage. Which disk drive do you use? Have you tried to run `fsck` for root filesystem from livemedia? Have you checked S.M.A.R.T information of the rootfs drive?
Raman  avatar
ug flag
@nobody I encountered an another error dpkg: warning: while removing mongodb-compass, directory '/usr/share/applications' not empty so not removed
Raman  avatar
ug flag
@N0rbert I am using Seagate Hard disk drive model - ST1000LM035-1RK172 (SDM3), and after checking SMART, the assessment showing. Disk is OK, 3384 bad sectors.
N0rbert avatar
zw flag
**3384 bad sectors** is large value. For 4K sectors it mean problematic 14 Mb. I would recommend at first to create full-backup of the drive, then run Victoria or MHDD on low-level with classic or advanced bad sectors remap on this problematic drive.
Raman  avatar
ug flag
I think, I got the big problem. I will try these.
nobody avatar
gh flag
warnings about a folder is not emtpty you can ignore. but so many bad sectors surely not.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.