Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I was running an upgrade with the apt-get command, and it was taking an exceptionally long time because half way through my ISP hit me in the face with their fair usage policy.

After sitting outside & watching the rain for awhile my electronics regained consciousness, so I went back to complete the upgrade and my terminal scolds me with

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

The last bit of legible info was all this:

Installing (ri/RDoc) documention for (stuff and such)
ERROR:  Could not find a valid gem 'watobo-' (>= 0) in any repository
rm: cannot remove `watobo-': No such file or directory

Setting up metasploit (4.3.0-bt1) ...
Upgrading Pre-Existing Installation...
/opt/metasploit/postgresql/scripts/ : postgresql  (pid 1191) already running
prosvc is running
metasploit is running
[*] Attempting to update the Metasploit Framework...

So on it goes for miles, talking about gem caches, rubies, & stuff I wish I had. All up until:

A    lib/gemcache/ruby/1.9.1/gems/state_machine-1.1.2/gemfiles/active_record-2.1.2.gemfile.lock

...and there it has sat, all night. If I stop it, will I still get the dpkg error (on the off chance that I won't), or if so what do I need to to resume using apt-get commands and its Super Cow Powers?

share|improve this question

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

This error is actually telling you exactly what is wrong: dpkg was interrupted as a result the package was not configured correctly.

Run the command it tells you to sudo dpkg --configure -a and it should be able to correct itself.

If it doesn't try running sudo apt-get install -f(to fix broken packages) and then try running sudo dpkg --configure -a again.

Just make sure you have internet access available so that you can download any dependencies.

{edit} These instructions may not work if by upgrade you meant apt-get dist-upgrade if you were trying to do a distribution upgrade(i.e. 11.10->12.04) then you will need to edit your question to reflect that.

share|improve this answer
i have done the same but it did not worked check this one… – agha rehan abbas May 20 '14 at 14:16

protected by Seth Apr 9 '14 at 15:02

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.