无法删除损坏的 mysql 包

无法删除损坏的 mysql 包

在我的服务器上,每当我尝试安装任何软件包时,都会出现以下错误

Setting up mysql-common:i386 (5.7.21-1ubuntu16.04) ...
update-alternatives: error: alternative path /etc/mysql/my.cnf.fallback doesn't exist
dpkg: error processing package mysql-common:i386 (--configure):
 subprocess installed post-installation script returned error exit status 2
dpkg: dependency problems prevent configuration of mysql-community-client:
 mysql-community-client depends on mysql-common (>= 5.7.21-1ubuntu16.04); however:
  Package mysql-common:i386 is not configured yet.
  Version of mysql-common on system, provided by mysql-common:i386, is <none>.

dpkg: error processing package mysql-community-client (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of mysql-client:
 mysql-client depends on mysql-community-client (= 5.7.21-1ubuntu16.04); however:
  Package mysql-community-client is not configured yet.

dpkg: error processing package mysql-client (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 mysql-common:i386
 mysql-community-client
 mysql-client
E: Sub-process /usr/bin/dpkg returned an error code (1)

我尝试使用“remove”命令和“purge”命令删除 mysql,但都无济于事。我还尝试在当前损坏的安装上重新安装 mysql,并尝试运行命令“sudo apt-get -f install”,但同样失败了。

无论我尝试做什么,我总是收到类似的错误,由于依赖性问题而无法继续,而且我不知道下一步该怎么做。

相关内容