无法升级 ubuntu 16.04--mysql 依赖项问题

无法升级 ubuntu 16.04--mysql 依赖项问题

ubuntu 16.04.3-尝试执行以下操作时:

sudo apt-get update 

这是我得到的:

Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
  libegl1-mesa libgl1-mesa-dri libinput10 libmirclient9 libwayland-egl1-mesa libxatracker2
  linux-headers-generic linux-headers-virtual linux-image-virtual linux-virtual
0 upgraded, 0 newly installed, 0 to remove and 10 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] Y
Setting up mysql-server-5.7 (5.7.19-0ubuntu0.16.04.1) ...
ERROR: Unable to start MySQL server:
2017-09-04T11:14:27.542500Z 0 [ERROR] unknown variable 'validate_password_check_user_name=1'
2017-09-04T11:14:27.546320Z 0 [ERROR] Aborting
Please take a look at https://wiki.debian.org/Teams/MySQL/FAQ for tips on fixing common upgrade issues.
Once the problem is resolved, run apt-get --fix-broken install to retry.
dpkg: error processing package mysql-server-5.7 (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of mysql-server:
 mysql-server depends on mysql-server-5.7; however:
  Package mysql-server-5.7 is not configured yet.

dpkg: error processing package mysql-server (--configure):
 dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
      Errors were encountered while processing:
 mysql-server-5.7
 mysql-server
E: Sub-process /usr/bin/dpkg returned an error code (1)

答案1

我遇到了同样的问题,很可能是由于安装/测试/删除了大量软件造成的。我通过清除并重新安装 mysql-server 解决了这个问题。

apt-get purge mysql-common

当然,在清除 mysql 数据之前,请先妥善保管数据。我不确定您的数据是否能经受住上述命令行的考验。我并不关心我的数据,因为它只是我用来测试的垃圾。

希望这可以帮助。

汤姆汤姆汤姆

答案2

我需要通过以下方式安装 mysql:

https://www.digitalocean.com/community/tutorials/how-to-install-the-latest-mysql-on-ubuntu-16-04

现在工作正常。

相关内容