Ubuntu 20.04 尝试通过任何 apt 操作启动 mysql 服务器,但失败了

Ubuntu 20.04 尝试通过任何 apt 操作启动 mysql 服务器,但失败了

我最近需要安装 MariaDB,并安装了它。启动时遇到了几个问题,于是决定删除该软件包。之后,我也无法启动 MySQL 服务器。我怎么也想不起来问题出在哪里。我甚至不确定自己是否知道,但最终,我决定重新安装 MySQL 服务器。

目前的情况是,我无法运行 apt,因为会出现错误“无法启动 MySQL Comunity Server”。

以下是输出sudo apt install rar

Reading package lists... Done
Building dependency tree       
Reading state information... Done
rar is already the newest version (2:5.5.0-1build1).
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up mysql-community-server (8.0.22-1ubuntu20.04) ...
Job for mysql.service failed because the control process exited with error code.
See "systemctl status mysql.service" and "journalctl -xe" for details.
Job for mysql.service failed because the control process exited with error code.
See "systemctl status mysql.service" and "journalctl -xe" for details.
invoke-rc.d: initscript mysql, action "start" failed.
● mysql.service - MySQL Community Server
     Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
     Active: activating (auto-restart) (Result: exit-code) since Wed 2020-12-09 14:48:36 +03; 14ms ago
       Docs: man:mysqld(8)
             http://dev.mysql.com/doc/refman/en/using-systemd.html
    Process: 19528 ExecStartPre=/usr/share/mysql-8.0/mysql-systemd-start pre (code=exited, status=0/SUCCESS)
    Process: 19593 ExecStart=/usr/sbin/mysqld (code=exited, status=3)
   Main PID: 19593 (code=exited, status=3)
     Status: "Server startup in progress"
dpkg: error processing package mysql-community-server (--configure):
 installed mysql-community-server package post-installation script subprocess returned error exit status 1
dpkg: dependency problems prevent configuration of mysql-server:
 mysql-server depends on mysql-community-server (= 8.0.22-1ubuntu20.04); however:
  Package mysql-community-server is not configured yet.

dpkg: error processing package mysql-server (--configure):
 dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
                                                                                                          Errors were encountered while processing:
 mysql-community-server
 mysql-server
E: Sub-process /usr/bin/dpkg returned an error code (1)

我不明白是什么让 apt 依赖于启动 MySQL 服务器。我不知道如何让它不这样做。我知道这些信息可能不够,但这就是我所拥有的全部。

相关内容