'dpkg --configure -a' problem after interrupted update

Asked by igg

My manual update was interrupted and when I try to install something or update I get this error message:

E: dpkg was interrupted, you must manually run 'dpkg --configure -a' to correct the problem.
E: _cache->open() failed, please report.

Then I type following command in Terminal (Applications → Accessories → Terminal):

sudo dpkg --configure -a

But I get the following:

nb@nb-lp:~$ sudo dpkg --configure -a
dpkg: failed to open package info file `/var/lib/dpkg/available' for reading: No such file or directory

Please help me!

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu apt Edit question
Assignee:
No assignee Edit question
Solved by:
Mark Rijckenberg
Solved:
Last query:
Last reply:
Revision history for this message
wojox (wojox) said :
#1

Try:

sudo cp /var/lib/dpkg/available-old /var/lib/dpkg/available

Revision history for this message
Best Mark Rijckenberg (markrijckenberg) said :
#2
Revision history for this message
Sam_ (and-sam) said :
#3

Mark, great job, thanks for sharing.

Revision history for this message
Mark Rijckenberg (markrijckenberg) said :
#4

You're welcome, Sam. :-)

Revision history for this message
igg (iggnored) said :
#5

Sorry, bat that didnt help me
Terminal says:

cp: cannot stat `/var/lib/dpkg/available-old': No such file or directory

:(((

Revision history for this message
Sam_ (and-sam) said :
#6

Usually that's when another app is already using package index.
Please make sure while working in a terminal to close all other package management related GUIs e.g. Synaptic, Update Manager, Software Center ...

Revision history for this message
igg (iggnored) said :
#7

Thanks Mark Rijckenberg, that solved my question.

Revision history for this message
nguyencongthanh (red-alert29) said :
#8

??