错误:通过 oracle 的 .deb 包安装 mysql

错误:通过 oracle 的 .deb 包安装 mysql
root@ubuntu:/home/brosl/Downloads# dpkg -i mysql-common_8.0.16-2ubuntu18.04_amd64.deb

Message: (Reading database ... 315468 files and directories currently installed.)
Preparing to unpack mysql-common_8.0.16-2ubuntu18.04_amd64.deb ...
Unpacking mysql-common (8.0.16-2ubuntu18.04) over (8.0.16-2ubuntu18.04) ...
Setting up mysql-common (8.0.16-2ubuntu18.04) ...
update-alternatives: error: alternative path /etc/mysql/my.cnf.fallback doesn't exist
dpkg: error processing package mysql-common (--install):
 installed mysql-common package post-installation script subprocess returned error exit status 2
Errors were encountered while processing:
 mysql-common

答案1

修复

update-alternatives:错误:替代路径 /etc/mysql/my.cnf.fallback 不存在

可能

sudo cp /etc/mysql/mysql.cnf /etc/mysql/my.cnf.fallback

但请注意,当您已经安装了 mysql 时会发生此错误,这是一种紧急停止:它会终止您当前的安装。

您需要先清除旧版本。如果您想保留该安装的数据库,您还需要转储当前数据库。

相关内容