PDA

View Full Version : [ubuntu] dpkg problems



Mathiasdm
May 22nd, 2008, 03:13 PM
During an update (after installing Hardy 8.04), my computer crashed (I had an APIC error), which seems to have corrupted dpkg.

When I go to System > Management > Update-Manager, I get a warning telling me to run

dpkg --configure -a
because dpkg was interrupted.

When I run that command, I get the following output:

dpkg: parse error, in file `/var/lib/dpkg/updates/0052' near line 1:
nieuwe regel in veldnaam `padding'


I then tried
sudo dpkg --clear-avail, that seemed to work (no output).

Next, I ran
sudo apt-get update and got (after a list of repositories):

E: dpkg was interrupted, you must manually run 'dpkg --configure -a' to correct the problem.

So I'm kind of in an infinite loop here :( Suggestions are welcome.

Mathiasdm
May 22nd, 2008, 04:06 PM
Wow, problem solved :)
I simply deleted
/var/lib/dpkg/updates/0052

Bmanery
May 22nd, 2008, 06:22 PM
Wow, problem solved :)
I simply deleted
/var/lib/dpkg/updates/0052
I'm a real newbe!
could you please tell me how and where you placed the PHP Code.
I'm having the same problem and need to use the code.

decoherence
May 22nd, 2008, 07:05 PM
It's not actually PHP Code, it's just marked as such.

To do these things, go to Applications>Accessories>Terminal

Assuming you're having this problem, my suggestion would be to try the following commands, one after the other



sudo dpkg --configure -a
sudo apt-get -f install
sudo apt-get update
sudo apt-get dist-upgrade

Just so you are aware, prefacing the commands with 'sudo' will ask for your password, just like the Update Manager does when you install packages. In the terminal your password is not echoed back to you, even as little dots. Just type it and press Enter.

That should get you cleaned up and back on the right track. Personally, I've never had to delete one of these update files, and I'd rather not tell you to 'sudo rm' anything as even an innocent typo can cause damage with the rm (remove/delete) command.