gpt4 book ai didi

mysql-server 无法在 Linux 上安装

转载 作者:太空宇宙 更新时间:2023-11-04 05:49:06 27 4
gpt4 key购买 nike

我像这样删除了当前的mysql:

apt-get remove --purge mysql-server mysql-client mysql-common
apt-get remove --purge mysql-client-core-5.5
apt-get autoremove
apt-get autoclean
rm -rf /var/lib/mysql

当我想重新安装时,我遇到了一些问题:

apt-get install mysql-server 

//输出为

The following packages have unmet dependencies:
mysql-server : Depends: mysql-server-5.5 but it is not going to be installed
E: Unable to correct problems, you have held broken packages.**

再一次

apt-get install mysql-server-5.5 

//输出为

以下信息可能有助于解决问题:

The following packages have unmet dependencies:
mysql-server-5.5 : PreDepends: mysql-common (>= 5.5.47-0+deb7u1) but it is not going to be installed
Depends: mysql-client-5.5 (>= 5.5.47-0+deb7u1) but it is not going to be installed
Recommends: mailx
E: Unable to correct problems, you have held broken packages.

我已经安装了很多次mysql-commonmysql-clint-5.5

可能出现什么问题?

最佳答案

我编写这个脚本是为了解决我的 ubuntu 20.04 中的此类问题,请参阅我的评论中的详细信息:

#!/bin/bash

#Force install of missing deps
sudo apt-get -f install -o Dpkg::Options::="--force-overwrite"

#Remove the installed Apache 2
sudo apt-get purge apache2\*

#And followed by:
sudo apt-get purge mysql\*
sudo rm -rf /var/lib/mysql
sudo rm -rf /etc/mysql
sudo dpkg -l | grep -i mysql
sudo apt-get clean
sudo apt-get aut
sudo updatedb

#Reinstall full webstack if you want to.
sudo apt-get install lamp-server^

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

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