重新安装 mysql 时出现此错误

重新安装 mysql 时出现此错误
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Suggested packages:
  mailx tinyca
The following NEW packages will be installed:
  mysql-server-5.7
0 upgraded, 1 newly installed, 0 to remove and 55 not upgraded.
2 not fully installed or removed.
Need to get 0 B/2.799 kB of archives.
After this operation, 47,1 MB of additional disk space will be used.
Preconfiguring packages ...
Setting up mysql-common (5.7.24-0ubuntu0.16.04.1) ...
update-alternatives: error: alternative path /etc/mysql/my.cnf.fallback doesn't exist
dpkg: error processing package mysql-common (--configure):
 subprocess installed post-installation script returned error exit status 2
Errors were encountered while processing:
 mysql-common
E: Sub-process /usr/bin/dpkg returned an error code (1)

答案1

尝试这个

sudo apt-get remove --purge mysql-\*
sudo apt-get install mysql-server mysql-client

相关内容