Experimente:
sudo dpkg-reconfigure --remove --force-remove-reinstreq mysql*
Isto irá forçar a remoção dos pacotes mysql sem primeiro configurar os pacotes python não configurados.
Eu tentei remover o mysql. Eu estou usando o Ubuntu 16.04 LTS amd64 e python 3.5.1+. O terminal me escreveu o erro mostrado abaixo. Qual é o problema? O que fiz de errado?
heartprogrammer@heartprogrammer-desktop:~$ sudo apt-get purge mysql* Reading package lists... Done Building dependency tree Reading state information... Done Note, selecting 'mysqltcl' for glob 'mysql*' Note, selecting 'mysql-mmm-agent' for glob 'mysql*' Note, selecting 'mysql-workbench' for glob 'mysql*' Note, selecting 'mysql-client-5.5' for glob 'mysql*' Note, selecting 'mysql-client-5.6' for glob 'mysql*' Note, selecting 'mysql-client-5.7' for glob 'mysql*' Note, selecting 'mysql-mmm-tools' for glob 'mysql*' Note, selecting 'mysql-common-5.6' for glob 'mysql*' Note, selecting 'mysql-server-5.0' for glob 'mysql*' Note, selecting 'mysql-server-5.1' for glob 'mysql*' Note, selecting 'mysql-server-5.5' for glob 'mysql*' Note, selecting 'mysql-server-5.6' for glob 'mysql*' Note, selecting 'mysql-server-5.7' for glob 'mysql*' Note, selecting 'mysql-utilities' for glob 'mysql*' Note, selecting 'mysql-testsuite' for glob 'mysql*' Note, selecting 'mysql-mmm-common' for glob 'mysql*' Note, selecting 'mysql-server' for glob 'mysql*' Note, selecting 'mysql-client' for glob 'mysql*' Note, selecting 'mysql-sandbox' for glob 'mysql*' Note, selecting 'mysql-client-core-5.5' for glob 'mysql*' Note, selecting 'mysql-client-core-5.6' for glob 'mysql*' Note, selecting 'mysql-client-core-5.7' for glob 'mysql*' Note, selecting 'mysql-testsuite-5.5' for glob 'mysql*' Note, selecting 'mysql-testsuite-5.6' for glob 'mysql*' Note, selecting 'mysql-testsuite-5.7' for glob 'mysql*' Note, selecting 'mysql-common' for glob 'mysql*' Note, selecting 'mysql-mmm-monitor' for glob 'mysql*' Note, selecting 'mysqltuner' for glob 'mysql*' Note, selecting 'mysql-workbench-data' for glob 'mysql*' Note, selecting 'mysql-server-core-5.1' for glob 'mysql*' Note, selecting 'mysql-server-core-5.5' for glob 'mysql*' Note, selecting 'mysql-server-core-5.6' for glob 'mysql*' Note, selecting 'mysql-server-core-5.7' for glob 'mysql*' Note, selecting 'mysql-source-5.7' for glob 'mysql*' Package 'mysql-client-5.5' is not installed, so not removed Package 'mysql-client-5.6' is not installed, so not removed Package 'mysql-server-core-5.6' is not installed, so not removed Package 'mysql-client-core-5.5' is not installed, so not removed Package 'mysql-client-core-5.6' is not installed, so not removed Note, selecting 'mysql-common' instead of 'mysql-common-5.6' Package 'mysql-server-5.5' is not installed, so not removed Package 'mysql-server-5.6' is not installed, so not removed Package 'mysql-server-core-5.5' is not installed, so not removed Package 'mysql-testsuite-5.5' is not installed, so not removed Package 'mysql-testsuite-5.6' is not installed, so not removed Package 'mysql-server-5.0' is not installed, so not removed Package 'mysql-server-5.1' is not installed, so not removed Package 'mysql-server-core-5.1' is not installed, so not removed Package 'mysql-mmm-agent' is not installed, so not removed Package 'mysql-mmm-common' is not installed, so not removed Package 'mysql-mmm-monitor' is not installed, so not removed Package 'mysql-mmm-tools' is not installed, so not removed Package 'mysql-sandbox' is not installed, so not removed Package 'mysql-utilities' is not installed, so not removed Package 'mysql-workbench' is not installed, so not removed Package 'mysql-workbench-data' is not installed, so not removed Package 'mysqltcl' is not installed, so not removed Package 'mysqltuner' is not installed, so not removed Package 'mysql-client' is not installed, so not removed Package 'mysql-source-5.7' is not installed, so not removed Package 'mysql-testsuite' is not installed, so not removed Package 'mysql-testsuite-5.7' is not installed, so not removed The following package was automatically installed and is no longer required: libaio1 Use 'sudo apt autoremove' to remove it. The following packages will be REMOVED: libmysqlclient20:i386* libqt4-sql-mysql:i386* mysql-client-5.7* mysql-client-core-5.7* mysql-common* mysql-server* mysql-server-5.7* mysql-server-core-5.7* 0 upgraded, 0 newly installed, 8 to remove and 11 not upgraded. 4 not fully installed or removed. After this operation, 165 MB disk space will be freed. Do you want to continue? [Y/n] y (Reading database ... 216375 files and directories currently installed.) Removing libqt4-sql-mysql:i386 (4:4.8.7+dfsg-5ubuntu2) ... Removing libmysqlclient20:i386 (5.7.12-0ubuntu1.1) ... Removing mysql-server (5.7.12-0ubuntu1.1) ... Removing mysql-server-5.7 (5.7.12-0ubuntu1.1) ... update-alternatives: using /etc/mysql/my.cnf.fallback to provide /etc/mysql/my.cnf (my.cnf) in auto mode Purging configuration files for mysql-server-5.7 (5.7.12-0ubuntu1.1) ... Removing mysql-client-5.7 (5.7.12-0ubuntu1.1) ... Removing mysql-client-core-5.7 (5.7.12-0ubuntu1.1) ... Removing mysql-common (5.7.12-0ubuntu1.1) ... Purging configuration files for mysql-common (5.7.12-0ubuntu1.1) ... dpkg: warning: while removing mysql-common, directory '/etc/mysql' not empty so not removed Removing mysql-server-core-5.7 (5.7.12-0ubuntu1.1) ... Processing triggers for libc-bin (2.23-0ubuntu3) ... Processing triggers for man-db (2.7.5-1) ... Setting up python-cairo (1.8.8-2) ... Traceback (most recent call last): File "/usr/bin/pycompile", line 35, in from debpython.version import SUPPORTED, debsorted, vrepr, \ File "/usr/share/python/debpython/version.py", line 24, in from ConfigParser import SafeConfigParser ImportError: No module named 'ConfigParser' dpkg: error processing package python-cairo (--configure): subprocess installed post-installation script returned error exit status 1 Setting up python-gobject-2 (2.28.6-12ubuntu1) ... Traceback (most recent call last): File "/usr/bin/pycompile", line 35, in from debpython.version import SUPPORTED, debsorted, vrepr, \ File "/usr/share/python/debpython/version.py", line 24, in from ConfigParser import SafeConfigParser ImportError: No module named 'ConfigParser' dpkg: error processing package python-gobject-2 (--configure): subprocess installed post-installation script returned error exit status 1 dpkg: dependency problems prevent configuration of python-gtk2: python-gtk2 depends on python-cairo (>= 1.0.2-1.1); however: Package python-cairo is not configured yet. python-gtk2 depends on python-gobject-2 (>= 2.21.3); however: Package python-gobject-2 is not configured yet. dpkg: error processing package python-gtk2 (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of gimp: gimp depends on python-gtk2 (>= 2.8.0); however: Package python-gtk2 is not configured yet. dpkg: error processing package gimp (--configure): dependency problems - leaving unconfigured No apport report written because the error message indicates its a followup error from a previous failure. No apport report written because MaxReports is reached already Processing triggers for libc-bin (2.23-0ubuntu3) ... Errors were encountered while processing: python-cairo python-gobject-2 python-gtk2 gimp E: Sub-process /usr/bin/dpkg returned an error code (1)
Experimente:
sudo dpkg-reconfigure --remove --force-remove-reinstreq mysql*
Isto irá forçar a remoção dos pacotes mysql sem primeiro configurar os pacotes python não configurados.
Tente visualizar a lista das partes do MySQL instaladas.
sudo dpkg -l | grep mysql
e tente eliminá-los um a um. Parece que você tem problemas de dependência e o apt-get não pode resolvê-los automaticamente.