![重新安装 mysql 时出现此错误](https://linux22.com/image/906339/%E9%87%8D%E6%96%B0%E5%AE%89%E8%A3%85%20mysql%20%E6%97%B6%E5%87%BA%E7%8E%B0%E6%AD%A4%E9%94%99%E8%AF%AF.png)
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