无法卸载 mysql-community-server

无法卸载 mysql-community-server

我正在尝试删除 mysql-community-server,但是它给出了以下信息:

sudo apt-get remove --purge mysql-server mysql-client mysql-common
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package 'mysql-client' is not installed, so not removed
Package 'mysql-server' is not installed, so not removed
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
mysql-community-server : Depends: mysql-common (>= 5.7.20-1debian7)
                          Depends: mysql-client (= 5.7.20-1debian7) but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

在那之后:

sudo apt --fix-broken install
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
  libaio1 libmecab2
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
  mysql-community-server
0 upgraded, 0 newly installed, 1 to remove and 28 not upgraded.
1 not fully installed or removed.
After this operation, 176 MB disk space will be freed.
Do you want to continue? [Y/n] 
(Reading database ... 376781 files and directories currently installed.)
Removing mysql-community-server (5.7.20-1debian7) ...
Failed to stop mysql.service: Unit mysql.service not loaded.
invoke-rc.d: initscript mysql, action "stop" failed.
dpkg: error processing package mysql-community-server (--remove):
 subprocess installed pre-removal script returned error exit status 5
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:
 subprocess installed post-installation script returned error exit status 5
Errors were encountered while processing:
 mysql-community-server
E: Sub-process /usr/bin/dpkg returned an error code (1)

没有运行任何服务:

sudo service mysql stop
Failed to stop mysql.service: Unit mysql.service not loaded.

我认为有必要指出的是,这个包是从 mysql 网站下载的,而不是从 repos 下载的。

sudo dpkg --remove --force-remove-reinstreq mysql-community-server
(Reading database ... 376781 files and directories currently installed.)
Removing mysql-community-server (5.7.20-1debian7) ...
Failed to stop mysql.service: Unit mysql.service not loaded.
invoke-rc.d: initscript mysql, action "stop" failed.
dpkg: error processing package mysql-community-server (--remove):
 subprocess installed pre-removal script returned error exit status 5
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:
 subprocess installed post-installation script returned error exit status 5
Errors were encountered while processing:
 mysql-community-server

我已经尝试了所有方法来删除mysql-community-server,有人能帮助我吗?

相关内容