Fix could not open file /var/lib/dpkg/status cydia error

You might get a nasty “could not open tệp tin /var/lib/dpkg/status” error or something similar if you’ve sầu been poking around the /var/lib/dpkg/ directory và clearing things out as the root users. Most files located in /var, according khổng lồ the Linux Filesystem Hierarchy Standard, are temporary & change during operation. However, that doesn’t mean that they need to be cleaned out the same way that a Web browser cađậy needs to lớn be cleared.

You watching: Fix could not open file /var/lib/dpkg/status cydia error

Since most Linux users don’t have sầu a need khổng lồ poke around here, the good news is that you probably won’t get this one nearly ever. Those who are on distributions that don’t use apt-get, such as Fedora or Arch, won’t ever get this error either since it’s wholly specific to that package manager. Nevertheless, if you’re dealing with it then read on.


Method 1: Fixing a Seemingly Random could not open tệp tin /var/lib/dpkg/status Error

If this error comes out of the blue, then type ls /var/lib/dpkg/status at the command line & take a look at the output.

You might also want to use a graphical file manager khổng lồ the browser over khổng lồ it và take a look.

*

Make sure that you see a status file in the results. You’ll normally just get a line that reads /var/lib/dpkg/status with nothing else after it before it returns you straight lớn the prompt. If that’s the case, then you have a file there and you should be okay. Cthất bại all the programs that you were working in after saving và then reboot.

Once you’re baông xã up và running, type suvày apt-get update followed by sudo apt-get upgrade at the terminal và follow the prompts. You’ll probably get asked for your administrator password, but once it updates you should be fine. You’ll want lớn watch for any odd errors.

See more: Phương Pháp Quản Lý Thời Gian Pomodoro, Sử Dụng Pomodoro Sao Cho Hiệu Quả


If the tệp tin wasn’t there, then you’ll have sầu some decisions to make.

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

Some users bachồng all their important data up at this point before reinstalling Linux. You could bởi this, but there might be a way to lớn salvage things first. There’s a backup copy of /var/lib/dpkg/status that gets made automatically, and hopefully not too much time has passed since you got the error that it caused it to lớn be out of sync.

Try running suvì cp /var/lib/dpkg/status-old /var/lib/dpkg/status at the terminal. If this doesn’t give you an error, then you can see if this fixed the issue. This restores the most recent backup copy of the status file, but unfortunately if it was too out of date you might still be in hot water. Nevertheless, you can restart then run subởi apt-get update followed by suvị apt-get upgrade lớn see what sorts of dependency errors over up coming up for you. In a best-case scenario, you won’t have sầu any và you’ll merely be able khổng lồ continue working with your system again lượt thích normal.

You could also try rebuilding the status menu. Type suvì chưng touch /var/lib/dpkg/status to lớn create an empty file as the root user & then try sudo apt-get install long-list from the terminal. There are a few scripts that vị this automatically, but this is essentially the same thing & comes without the dangers of running a potentially outdated script on your machine. Be warned that you’ll need to remember what you have on your system for this lớn work, and the software will prompt you lớn rethành viên.

See more: Truyền Thuyết 12 Vị Thần Trên Đỉnh Olympus, Tên Các Vị Thần Hy Lạp Nổi Tiếng, Quyền Lực Nhất

You can also try ls /var/backups/dpkilogam.status* & see what ones are there that you might instead want lớn use for this.

*

Take a look at the các mục that comes up when you run that. If you see one that isn’t zipped up, then try suvì chưng cp /var/backups/dpkilogam.status.0 /var/lib/dpkg/status and see if that fixes things. You could always copy one of the other ones và run the gunzip command on it lớn decompress it. However, keep in mind that the further back you go the higher your risk of updating an obsolete file that would cause broken dependencies


Chuyên mục: Công Nghệ