When I attempt to do the following:
sudo apt-get update
sudo apt-get upgrade
on my Ubuntu Server 10.04 installation, it hangs at the following line:
Preparing to replace mysql-server-5.1 5.1.41-3ubuntu12.1 (using .../mysql-server-5.1_5.1.41-3ubuntu12.3_i386.deb)
I cannot even CTRL-C out of it! I end up having to kill my session and log in from a different terminal and the upgrade process is still running. I have rebooted it several times and when I go back and try again it tells me:
E: dpkg was interrupted, you must manually run 'sudo --configure -a' to correct the problem.
Once I do that I am back at square one and it freezes up when I try to upgrade mySQL.
Best Answer
Try going a level below apt, after backing up your databases:
added:
Since
dpkg -r
is choking trydpkg --purge
and failing that get the package contents withdpkg -L mysql-server-5.1
zap them and then muck about in/var/lib/dpkg
.I've never seen things get that hairy, sorry.
if at first you don't succeed
I'm sorta thinking aloud here, forgive me. The mysql-server meta-package contains or requires these packages:
libdbd-mysql-perl
libdbi-perl
libhtml-template-perl
libnet-daemon-perl
libplrpc-perl
mysql-client-5.1
mysql-client-core-5.1
mysql-server
mysql-server-5.1
mysql-server-core-5.1
The meta-data for package management is delightfully decoupled, there are central repositories but the packages stand alone.
/var/cache/apt/archives
is where*.deb
files that have been installed live.First, force dpkg to forget about these packages (at the risk of failure to remove some files that we're going to replace anyway).
Then get the .deb files needed for a full install:
and then try installing them one by one:
if you have problems there, try:
And try and find the relevant lines out of the zillion in the logfile and post them here. Good luck and godspeed.