Reputation: 83
I was trying to uninstall mysql using apt-get purge mysql-server but uninstall was not sucessfull and now it blocks installation of mariadb.
petter@server:~$ sudo dpkg -P --force-all mysql-server-8.0
(Reading database ... 71256 files and directories currently installed.)
Removing mysql-server-8.0 (8.0.22-0ubuntu0.20.04.3) ...
Failed to stop mysql.service: Unit mysql.service not loaded.
invoke-rc.d: initscript mysql, action "stop" failed.
dpkg: error processing package mysql-server-8.0 (--purge):
installed mysql-server-8.0 package pre-removal script subprocess returned error exit status 1
Failed to stop mysql.service: Unit mysql.service not loaded.
invoke-rc.d: initscript mysql, action "stop" failed.
Failed to start mysql.service: Unit mysql.service not found.
invoke-rc.d: initscript mysql, action "start" failed.
Unit mysql.service could not be found.
dpkg: error while cleaning up:
installed mysql-server-8.0 package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
mysql-server-8.0
Upvotes: 1
Views: 1451
Reputation: 1430
Some missing files maybe, try reinstalling it first with --reinstall
and then prune it again
Upvotes: 1