Problems with Update Manager (dpkg was interrupted)

Asked by kiroro

Every time I run update manager, an error window shows: 'Not all updates can be installed', 'Partial Upgrade suggested'. When I click 'Check' for new updates, an error message shows:

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

So I ran 'sudo dpkg --configure -a', and I got the following:

**********************************************************
Setting up initramfs-tools (0.85eubuntu20) ...
update-initramfs: deferring update (trigger activated)
Setting up linux-image-2.6.22-14-generic (2.6.22-14.52) ...
Running depmod.
update-initramfs: Generating /boot/initrd.img-2.6.22-14-generic
/usr/sbin/mkinitramfs: 13: getopt: not found
Terminating...
update-initramfs: failed for /boot/initrd.img-2.6.22-14-generic
Failed to create initrd image.
dpkg: error processing linux-image-2.6.22-14-generic (--configure):
 subprocess post-installation script returned error exit status 2
dpkg: dependency problems prevent configuration of realplay:
 realplay depends on libstdc++5 (>= 1:3.3.4-1); however:
  Package libstdc++5 is not installed.
dpkg: error processing realplay (--configure):
 dependency problems - leaving unconfigured
Processing triggers for initramfs-tools ...
update-initramfs: Generating /boot/initrd.img-2.6.22-14-generic
/usr/sbin/mkinitramfs: 13: getopt: not found
Terminating...
update-initramfs: failed for /boot/initrd.img-2.6.22-14-generic
dpkg: subprocess post-installation script returned error exit status 1
****************************************************************

I tried 'sudo apt-get install -f' as well. Same error with the first one...
How can I fix this? Many thanks!

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
kiroro
Solved:
Last query:
Last reply:
Revision history for this message
Bhavani Shankar (bhavi) said :
#1

Hello

This problem is appeared to be with command getopt and getopt is a part of the utils-linux package. So please install the package:

sudo apt-get install utils-linux

and reboot...

After reboot, Please do:

sudo dpkg --configure -a

Have a try and keep us informed

Regards

Bhavani Shankar.

Revision history for this message
kiroro (egret-bing) said :
#2

Thanks, Bhavani.

I ran 'sudo apt-get install utils-linux', but got the same error: "E: dpkg was interrupted, you must manually run 'dpkg --configure -a' to correct the problem."

Now I can not even open the Synaptic Package Manager. Looks like I am having serious problems.

Revision history for this message
Pierre Frenkiel (pierre-frenkiel) said :
#3

If you actually ran 'sudo apt-get install utils-linux', you should got: Couldn't find package utils-linux
The package name is util-linux

Revision history for this message
kiroro (egret-bing) said :
#4

No, I did not put any ' in the command. I restarted my computer and ran:

sudo apt-get install utils-linux

again, and still got:

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

So frustrated...

Revision history for this message
kiroro (egret-bing) said :
#5

Bump...anyone has a solution to fix this? It appears I can not use apt-get at all. And the Synaptic Package Manager is broken too..

I noticed Question #26400 referred to a very similar problem, and “sudo apt-get install utils-linux” solved it. But it does not work for me.

I also tried "sudo dpkg --configure -a && sudo apt-get -f install" and No luck...

Revision history for this message
kiroro (egret-bing) said :
#6

Is there any other way to install utils-linux other that using apt-get? I think installing this package may solve the problem, but how can I manage to install it?

Revision history for this message
Pierre Frenkiel (pierre-frenkiel) said :
#7

I thought that my previous post was clear enough:
the actual name of the package is util-linux.

Revision history for this message
kiroro (egret-bing) said :
#8

Hi Pierre,

Thanks for the clarification. But the problem was that I could not even use apt-get. No matter what I put behind 'sudo apt-get install' , it just would not work.

I partially solved the problem by copying the file 'getopt' from other people to my /usr/bin. Now I can install updates and use Synaptic Package Manager.

But there still is something wrong. Now when I run sudo dpkg --configure -a, I get:

********************************************
dpkg: dependency problems prevent configuration of realplay:
 realplay depends on libstdc++5 (>= 1:3.3.4-1); however:
  Package libstdc++5 is not installed.
dpkg: error processing realplay (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 realplay
**********************************************

I think this output is part of the original output. Is it something to do with realplayer? Or am I missing packages like libstdc++5?

Revision history for this message
kiroro (egret-bing) said :
#9

Ok, I solved the last problem by doing:

sudo apt-get install libstdc++5

Now 'sudo dpkg --configure -a' returns:

*************************
Setting up realplay (10.0.9-0feisty1) ...
*************************

I really appreciate everybody's help.

Revision history for this message
Tuomas Aavikko (taavikko) said :
#10

Any information available to make this "sudo dpkg --configure -a" process automated?
To do it when occured. Sorry to use this as venue for a question. But this is a problem that needs to attention.
Many starting gnu/linux users comes across this issue and don't know how to deal with it.

Answers how to clear are on every forum, but most of the time users are lazy to search for the answer.

Revision history for this message
Sarab (drsarabpreet) said :
#11

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

This message is not allowing me do anything - how to solve the issue.
How to run the command - i have been doing it thru application and terminal - but of no use - same message is displayed for all commands - kindly give your valuable suggestions

Revision history for this message
Brandy Stclaire (brandy-stclaire-2006) said :
#12

I got the same thing, I've been searching for hours, I actually got it working last time it did this to me! I am starting to get upset with Ubuntu!!

Revision history for this message
marcobra (Marco Braida) (marcobra) said :
#13

To get your system perfectly update and upgraded...

Open a Terminal from the menu Applications → Accessories → Terminal and type:

sudo dpkg --configure -a
sudo apt-get -f install
sudo apt-get --fix-missing install
sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade
sudo apt-get clean
sudo apt-get autoremove

then please reboot your system, type

sudo reboot

give your user password when requested, you don't see nothing when you type it, then press enter.

Hope this helps