在 mysql 上安装了 MariaDB,卸载后重新安装,现在出现错误

在 mysql 上安装了 MariaDB,卸载后重新安装,现在出现错误

我目前收到 dpkg 错误,并且缺少 mysql-server 的目录

尝试在谷歌上查找,但没有任何帮助,我清除了所有内容。

机器详细信息:Ubuntu 22.04

我运行了该命令sudo apt install mysql-server并在安装结束时出现以下错误:

update-alternatives: using /var/lib/mecab/dic/ipadic-utf8 to provide /var/lib/mecab/dic/debian (mecab-dictionary) in auto mode
Setting up libhtml-parser-perl:amd64 (3.76-1build2) ...
Setting up libhttp-message-perl (6.36-1) ...
Setting up mysql-server-8.0 (8.0.34-0ubuntu0.22.04.1) ...
/var/lib/dpkg/info/mysql-server-8.0.postinst: line 202: /usr/share/mysql-common/configure-symlinks: No such file or directory
dpkg: error processing package mysql-server-8.0 (--configure):
 installed mysql-server-8.0 package post-installation script subprocess returned error exit status 127
Setting up libcgi-pm-perl (4.54-1) ...
Setting up libhtml-template-perl (2.97-1.1) ...
dpkg: dependency problems prevent configuration of mysql-server:
 mysql-server depends on mysql-server-8.0; however:
  Package mysql-server-8.0 is not configured yet.

dpkg: error processing package mysql-server (--configure):
 dependency problems - leaving unconfigured
Setting up libcgi-fast-perl (1:2.15-1) ...
No apport report written because the error message indicates its a followup error from a previous failure.
                                                                                                          Processing triggers for man-db (2.10.2-1) ...
Processing triggers for libc-bin (2.35-0ubuntu3.1) ...
Errors were encountered while processing:
 mysql-server-8.0
 mysql-server
needrestart is being skipped since dpkg has failed
E: Sub-process /usr/bin/dpkg returned an error code (1)

运行时sudo mysql:错误 2002 (HY000):无法通过套接字“/var/run/mysqld/mysqld.sock”连接到本地 MySQL 服务器 (2) 并且套接字文件丢失我检查过。

我查看了有同样问题的帖子,但没有找到答案。

相关内容