apt-get unable to parse status file

Hey All,

I installed a package via dpkg, and now when I try to use apt-get/apt-cache I get the error: > root@g [/var/lib/dpkg]# apt-get autoclean

Reading Package Lists… Error!

E: Unable to parse package file /var/lib/dpkg/status (1)

E: The package lists or status file could not be parsed or opened.
This error occurs with any apt-get or apt-cache command that I've tried.

I've tried rebooting my linode, no luck. I also tried swapping status and status-old, still no luck. I've been searching around but haven't found a solution to this issue. Any ideas?

8 Replies

apt-get update?

-Chris

Well I resolved this by using a backup from /var/backups/dpkg.status.0 but I'm wondering what negative impact this has on the package that I installed (that clearly caused the issue)

When I put the bad status file back and run apt-get update:
> root@g [/var/lib/dpkg]# apt-get update

Hit http://mirrors.kernel.org stable/main Packages

Hit http://mirrors.kernel.org stable/main Release

Hit http://mirrors.kernel.org stable/contrib Packages

Hit http://mirrors.kernel.org stable/contrib Release

Hit http://mirrors.kernel.org stable/non-free Packages

Hit http://mirrors.kernel.org stable/non-free Release

Hit http://mirrors.kernel.org stable/main Sources

Hit http://mirrors.kernel.org stable/main Release

Hit http://mirrors.kernel.org stable/contrib Sources

Hit http://mirrors.kernel.org stable/contrib Release

Hit http://mirrors.kernel.org stable/non-free Sources

Hit http://mirrors.kernel.org stable/non-free Release

Hit http://security.debian.org stable/updates/main Packages

Hit http://security.debian.org stable/updates/main Release

Hit http://security.debian.org stable/updates/contrib Packages

Hit http://security.debian.org stable/updates/contrib Release

Hit http://security.debian.org stable/updates/non-free Packages

Hit http://security.debian.org stable/updates/non-free Release

Reading Package Lists… Error!

E: Unable to parse package file /var/lib/dpkg/status (1)

E: The package lists or status file could not be parsed or opened.

http://www.debian.org/doc/manuals/refer … #s-recover">http://www.debian.org/doc/manuals/reference/ch-package.en.html#s-recover

if that doesn't work, i think you're pretty much SOL.

Where did you get the .deb you installed with dpkg?

@OverlordQ:

http://www.debian.org/doc/manuals/refer … #s-recover">http://www.debian.org/doc/manuals/reference/ch-package.en.html#s-recover

if that doesn't work, i think you're pretty much SOL.

Where did you get the .deb you installed with dpkg?
s-recover does not seem to be a valid section. Do you have the numbered section that link refers to?

As far as the deb, it was built from an rpm using alien. Could be part of the problem, but imho it shouldn't cause a failure such as this. But I do accept that this could just be a situation where playing with fire can cause issues :) Replacing the status with the backup resolved the issue, and the deb package that I installed still functions, so this is a bit of a moot topic, but I'm just curious why installing an arbitrary package would destroy apt :)

Now for the shameless plug: The package was the Kerio MailServer, for whom which I work for (Technical Support Engineer). At the current time we do not support Debian, we only provide rpm packages on the Linux side, although I managed to get it working on my Debian system by using alien and building a custom init script :D

http://www.debian.org/doc/manuals/refer … ver-status">http://www.debian.org/doc/manuals/reference/ch-package.en.html#s-recover-status

If you could post that status file (the 'corrupted' one) or even the .deb I could probably tell you why it's not working, there's a certain bug i'm thinking that's causing this.

@OverlordQ:

http://www.debian.org/doc/manuals/refer … ver-status">http://www.debian.org/doc/manuals/reference/ch-package.en.html#s-recover-status

If you could post that status file (the 'corrupted' one) or even the .deb I could probably tell you why it's not working, there's a certain bug i'm thinking that's causing this.

Looks like we can't attach files to our posts here, so I have tar'ed up the bad status file, and the one I'm currently using, which was copied from /var/backups/dpkg.status (so that you can do a diff on them if you want which should list what changed)

http://thomber.net/status_files.tar

If you end up needing the deb, let me know.

Nah I think that's it.

Bug 276060

Might want to report it.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct