I'm trying to install bugzilla3. I previously had mysql-server-5.1 installed, and it gave the following error:
Aborting downgrade from (at least) 5.1 to 5.0.
dpkg: error processing /var/cache/apt/archives/mysql-server-5.0_5.1.30really5.0.75-0ubuntu10.2_i386.deb (--unpack):
subprocess pre-installation script returned error exit status 1
Errors were encountered while processing:
/var/cache/apt/archives/mysql-server-5.0_5.1.30really5.0.75-0ubuntu10.2_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
I went onto the ubuntu irc channel and asked for help where I was told to downgrade mysql to 5.0 and then install bugzilla.
So I went to do this. However when I
sudo apt-get remove mysql-server-5.1
the bugzilla installation configuration begins, and goes until it stops again complaining about the 5.1 -> 5.0 downgrade.
So I went and asked again on the irc and I was told to
sudo apt-get clean
sudo apt-get update
which I did.
It was still happening however so I removed the bugzilla3 package and tried to remove mysql then. And apparently it wasn't there. (I checked mysql-server, mysql-server-5.1 and mysql-server-5.0).
So I went to install bugzilla3 again, and it got as far as last time and complained about mysql-server-5.1 -> 5.0 downgrade. And now apt-get reported it was there, but it won't remove it as it starts the bugzilla install.
How do I fix this?
If you look in /var/lib/dpkg/info/mysql-server-5.0.preinst you'll see:
So if you delete /var/lib/mysql/debian-*.flag it'll let it go through.
See the mysql docs on how to downgrade mysql itself safely
You could force a removal of the bugzilla package with
dpkg --purge
?just do this:
sudo apt-get remove mysql-server-5.1
sudo apt-get clean
mv /var/lib/mysql /var/lib/mysqlbak
sudo apt-get update
sudo apt-get install mysql-server
mv /var/lib/mysql /var/lib/mysqlbak2
mv /var/lib/mysqlbak /var/lib/mysql
sudo /etc/init.d/mysql restart
I know it's neither clean nor perfect but it works at least for me.