在EC2 Ubuntu中安装Mysql时,出现错误“packages has unmet dependencies”(软件包具有未满足的依赖项):

6ie5vjzr  于 2022-10-31  发布在  Mysql
关注(0)|答案(2)|浏览(134)

我尝试在ec2 ubuntu-xenial-16.04上安装mysql。当我尝试运行以下命令时:

sudo apt-get install mysql-server

我收到一个错误,如:

Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 linux-headers-5.13.0-1028-aws : Depends: linux-aws-5.13-headers-5.13.0-1028 but it is not going to be installed
 mysql-server : Depends: mysql-server-8.0 but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

有什么建议吗?

eyh26e7m

eyh26e7m1#

请尝试以下操作:
更新存储库

sudo apt-get update

安装缺少依赖项的mysql-server

sudo apt-get install -f mysql-server
vqlkdk9b

vqlkdk9b2#

这个命令sudo apt-get install -f解决了我的问题。

相关问题