After problems with MySQL server that couldn't finish an update properly (5.7.24). I followed this answer. So basically, I can come back in a "stable" state when after running the following commands:
sudo apt update sudo apt-get update sudo apt-get upgrade sudo apt-get autoremove sudo apt-get autoclean sudo dpkg --configure -a
All is working, MySQL is removed and no error are returned. (I could do the apt purge without error). There are no more
/var/lib/mysql directories. And the last dpkg doesn't find anything to do and returns nothing.
I reboot to be sure. But now, when I am doing :
sudo apt-get install mysql-server
I am getting this error:
dpkg: error processing package mysql-server-5.7 (--configure): subprocess installed post-installation script returned error exit status 1 dpkg: dependency problems prevent configuration of mysql-server: mysql-server depends on mysql-server-5.7; however: Package mysql-server-5.7 is not configured yet. dpkg: error processing package mysql-server (--configure): dependency problems - leaving unconfigured Errors were encountered while processing: mysql-server-5.7 mysql-server E: Sub-process /usr/bin/dpkg returned an error code (1)
Saying that is still not configured and there are dependency problems. So the install can't finish with success.
sudo dpkg-reconfigure mysql-server-5.7
/usr/sbin/dpkg-reconfigure: mysql-server-5.7 est cassé ou partiellement installé
Can't be done because mysql-server-5.7 is broken or partially installed. So, is there a way to really return to a fresh state? I don't have to keep existing MySQL databases or configurations. Thanks.