You can get a nasty “could no open document /var/lib/dpkg/status” error or something similar if you’ve to be poking approximately the /var/lib/dpkg/ directory and clearing things out as the root users. Most papers located in /var, follow to the Linux Filesystem hierarchy Standard, are temporary and readjust during operation. However, that doesn’t median that they need to be cleaned out the same way that a Web internet browser cache needs to be cleared.

You are watching: Could not open file var lib dpkg status

Since most Linux users don’t have a must poke about here, the an excellent news is that you most likely won’t get this one nearly ever. Those who space on distributions that don’t usage apt-get, such together Fedora or Arch, won’t ever before get this error either due to the fact that it’s wholly details to the package manager. Nevertheless, if you’re taking care of it then review on.


Method 1: resolving a seemingly Random might not open paper /var/lib/dpkg/status Error

If this error comes the end of the blue, then type ls /var/lib/dpkg/status in ~ the command line and also take a look in ~ the output.

You might also want to usage a graphical paper manager come the web browser over come it and also take a look.

*

Make certain that you see a status record in the results. You’ll normally just obtain a line that reads /var/lib/dpkg/status with nothing else after it before it return you right to the prompt. If that’s the case, then you have actually a document there and also you should be okay. Close every the programs that you were functioning in after ~ saving and then reboot.

Once you’re ago up and also running, form sudo apt-get update followed by sudo apt-get upgrade in ~ the terminal and also follow the prompts. You’ll probably get asked for your administrator password, but once that updates you must be fine. You’ll want to clock for any type of odd errors.


If the document wasn’t there, then you’ll have some decision to make.

Method 2: Recreating /var/lib/dpkg/status

Some users back all their essential data up at this suggest before reinstalling Linux. You could do this, however there can be a means to salvage points first. There’s a back-up copy of /var/lib/dpkg/status that gets made automatically, and also hopefully no too much time has passed due to the fact that you obtained the error the it caused it to be out of sync.

Try to run sudo cp /var/lib/dpkg/status-old /var/lib/dpkg/status at the terminal. If this doesn’t give you an error, then you have the right to see if this addressed the issue. This restores the many recent back-up copy of the status file, yet unfortunately if that was as well out of day you could still be in hot water. Nevertheless, you deserve to restart then run sudo apt-get update adhered to by sudo apt-get upgrade to watch what sorts of dependency errors end up comes up for you. In a best-case scenario, girlfriend won’t have any and you’ll merely have the ability to continue working with your system again like normal.

You might also try rebuilding the status list. Type sudo touch /var/lib/dpkg/status to develop an empty record as the source user and then shot sudo apt-get install long-list native the terminal. There space a couple of scripts that carry out this automatically, however this is essentially the exact same thing and comes there is no the risks of to run a perhaps outdated manuscript on her machine. Be warned the you’ll need to remember what you have actually on your mechanism for this to work, and also the software will notice you to remember.

See more: In The Time Of The Butterflies Pdf ), In The Time Of The Butterflies

You have the right to also shot ls /var/backups/dpkg.status* and also see what ones space there that you could instead desire to usage for this.

*

Take a look at the list the comes up when you operation that. If you see one that isn’t zipped up, then shot sudo cp /var/backups/dpkg.status.0 /var/lib/dpkg/status and also see if that fixes things. Girlfriend could constantly copy among the other ones and also run the gunzip command top top it to decompress it. However, save in mind that the further ago you walk the greater your danger of update an obsolete record that would certainly cause broken dependencies