May 042010
 

From blog.bodhizazen.net

I recently upgraded from Ubuntu 8.04.3 to Ubuntu 10.04 and things went well, except a few broken packages.

Apt-get / synaptic was very broken due to the flashplugin-nonfree.

sudo apt-get -f
[clip]
dpkg: error processing flashplugin-nonfree (--remove):
Package is in a very bad inconsistent state – you should
reinstall it before attempting a removal.
Errors were encountered while processing:
flashplugin-nonfree
E: Sub-process /usr/bin/dpkg returned an error code (1)

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

Not looking very good … and forcing things did not help (same results with –remove –force-remove-reinstreq.


dpkg --remove --force-all flashplugin-nonfree
dpkg: warning: overriding problem because --force enabled:
Package is in a very bad inconsistent state - you should
reinstall it before attempting a removal.
(Reading database ... 239938 files and directories currently installed.)
Removing flashplugin-nonfree ...
update-alternatives: error: no alternatives for iceape-flashplugin.
update-alternatives: error: no alternatives for iceape-flashplugin.
dpkg: error processing flashplugin-nonfree (--remove):
subprocess installed pre-removal script returned error exit status 2
postinst called with argument `abort-remove'
dpkg: error while cleaning up:
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
flashplugin-nonfree

To fix the problem I needed to manually remove the package.

cd /var/lib/dpkg/info
sudo rm flashplugin-nonfree.*

Now remove the offending packages:

sudo dpkg --remove --force-remove-reinstreq flashplugin-nonfree
sudo dpkg --remove --force-remove-reinstreq realplayer

Voilà – apt-get is now fixed =)

 Posted by at 6:22 am