E: Sub-process /usr/bin/dpkg exited unexpectedly

Asked by Sadu

ANYTHING dealing with dpkg will result in an error:
E: Sub-process /usr/bin/dpkg exited unexpectedly

Typing: sudo dpkg --configure -a
Results in: Bus error (core dumped)

Cannot update
Cannot install anything
Cannot do anything with dpkg

Full messages:
dpp@pmkcpu:~$ sudo apt-get install rar
Reading package lists... Done
Building dependency tree
Reading state information... Done
Suggested packages:
  unrar
The following NEW packages will be installed:
  rar
0 upgraded, 1 newly installed, 0 to remove and 4 not upgraded.
Need to get 0B/506kB of archives.
After unpacking 1036kB of additional disk space will be used.
E: Sub-process /usr/bin/dpkg exited unexpectedly

dpp@pmkcpu:~$ sudo dpkg --configure -a
Bus error (core dumped)

Question information

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

Hello... hmm...
Things like this may happen because:

Using testing/unstable it is suggested to update and upgrade your system before installing new packages.
You have 4 packages not upgraded.
Never mix testing with unstable.
You obviously have both testing and unstable in your sources.list file.
How to fix things.
1. Use dpkg to get rid of those half-installed packages. 'dpkg --force-help' and 'man dpkg' will be your friends.
2. Edit your /etc/apt/sources.list file and remove lines pointing to unstable.
3. Run apt-get update followed by apt-get upgrade.
After completing these steps there is a chance things will work for you.

Tips.
You can try aptitude instead of apt-get.
Keep the number of running services minimal when upgrading.

Hope it helps....

br

Bhavani Shankar.

Revision history for this message
Sadu (dpp-neko) said :
#2

I'm quite new to ubuntu, and linux in general.
Could you explain in simpler terms, or step-by-step?

Revision history for this message
Sadu (dpp-neko) said :
#3

On the ubuntu forums, they suggested I replace dpkg using the Live CD.
Is this a good or bad idea?

Revision history for this message
Best Bhavani Shankar (bhavi) said :
#4

yes you can try it out.. Its better I think.. To do that Please refer the article below:
http://ubuntuforums.org/showthread.php?t=422523

and dont worry the community is there to help you out in crisis..

have fun and relax,

Bhavani Shankar.

Revision history for this message
Sadu (dpp-neko) said :
#5

Thanks Bhavani Shankar, that solved my question.