gpt4 book ai didi

mysql - 无法在 ubuntu 16.04 上安装 mysql

转载 作者:太空狗 更新时间:2023-10-29 12:40:11 24 4
gpt4 key购买 nike

我运行了以下命令

wget http://repo.mysql.com/mysql-apt-config_0.8.9-1_all.deb
sudo dpkg -i mysql-apt-config_0.8.9-1_all.deb
sudo apt-get update

一切顺利,但当我击中

sudo apt-get install mysql-server

它给了我以下错误

Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:

The following packages have unmet dependencies: mysql-server : Depends: mysql-community-server (= 5.7.20-1ubuntu16.04) but it is not going to be installed E: Unable to correct problems, you have held broken packages.

为了修复损坏的包,我确实运行了

sudo apt-get install -f
sudo apt autoremove
sudo apt-get update

但一切都是徒劳。提前感谢你们:)

最佳答案

首先,我删除了 MySQL:

sudo apt-get purge mysql-server mysql-client mysql-common mysql-server-core-* mysql-client-core-*
sudo rm -rf /etc/mysql /var/lib/mysql
sudo apt-get autoremove
sudo apt-get autoclean

然后我从 oficial page 下载了 .deb并使用了以下命令:

curl -OL https://dev.mysql.com/get/mysql-apt-config_0.8.12-1_all.deb
sudo dpkg -i mysql-apt-config*
sudo apt update
sudo apt install mysql-server -y

此时由于 Ubuntu eoan“不兼容”(我使用的是 Ubuntu 19.10),我遇到了麻烦,显示如下消息:“MySQL 不支持检测到的系统(Debian jessie)。如果您认为该平台是与支持的系统之一兼容,可以选择相应的存储库之一”。但我研究了MySQL bugs page然后跑:

dpkg -i mysql-apt-config_0.8.13-1_all.deb 
sudo apt update
sudo apt install mysql-server -y

完成后,您可以使用以下命令检查安装:

sudo systemctl status mysql.service

你应该会看到类似...

yep, my system is named Linus, you may laugh

这对我有用,在 StackExchange 中尝试解决方案后,没有一个有效。我希望这有帮助!如果我做错了什么,请寻求反馈,谢谢。

关于mysql - 无法在 ubuntu 16.04 上安装 mysql,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48012246/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com