![安装 mysql - 没有安装候选](https://linux22.com/image/85934/%E5%AE%89%E8%A3%85%20mysql%20-%20%E6%B2%A1%E6%9C%89%E5%AE%89%E8%A3%85%E5%80%99%E9%80%89.png)
我以前是这样安装mysql 5.6的..但是现在..
# echo "deb http://repo.mysql.com/apt/debian/ $(lsb_release -sc) mysql-5.6" >> /etc/apt/sources.list && echo "deb-src http://repo.mysql.com/apt/debian/ $(lsb_release -sc) mysql-5.6" >> /etc/apt/sources.list && apt-get update
# apt-get install mysql-server-5.6
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package mysql-server-5.6 is a virtual package provided by:
mysql-community-server 5.6.29-1debian8 [Not candidate version]
E: Package 'mysql-server-5.6' has no installation candidate
我需要重新安装mysql 5.6。已经尝试过这个
# apt-get install --reinstall mysql-community-server
Reading package lists... Done
Building dependency tree
Reading state information... Done
Reinstallation of mysql-community-server is not possible, it cannot be downloaded.
最初它是安装的
apt-get install mysql-server-5.6
答案1
sudo apt install mariadb-server
答案2
如果您导航http://repo.mysql.com/apt/debian/pool/repo,您会发现各种可用版本。
看起来 mysql-server-5.6 是一个元包,现在已经不存在了。
但是,要发现安装的实际包名称,只需执行以下操作:
apt-cache search mysql-server
并且应该出现实际的安装包名称。
答案3
安装前尝试配置MySQL PPA(您需要选择SQL版本,例如5.7)
wget http://repo.mysql.com/mysql-apt-config_0.8.13-1_all.deb
sudo dpkg -i mysql-apt-config_0.8.13-1_all.deb
现在,更新并安装它
sudo apt update
sudo apt install mysql-server
来源:技术管理员
答案4
添加存储库后,使用- 即-madison
选项搜索它,它会告诉您哪些存储库可以使用哪些版本(来自您的sources.list*内容)apt-cache
apt-cache madison mysql-server