升级到 Bionic Beaver 后 MySQL 5.7 安装影响

升级到 Bionic Beaver 后 MySQL 5.7 安装影响

我已经看到了在文件deb中设置的可以操作的条目。source.listapt-get

在 Ubuntu 中更新 source.list

同样,作为我的 UbuntuVM 升级的一部分,我后来通过一些 Web 仪表板更新了 source.list,Bionic Beaver并按照指示进行了操作curlcopy paste但在此之前,为了执行某些活动,我运行了以下命令,这很有成效。

sudo apt-get update && sudo apt-get dist-upgrade -y

然后,我安装了 MySQL 8(5.8)。现在我必须回到 5.7。现在以下命令基本上失败了,

sudo apt-get install mysql-server-5.7

dist-upgrade -y因为我们已经用for标记了我们的升级框apt-get

现在我要自己做,这样我就可以使用安装 MySQL 5.7apt-get

我已经卸载了 MySQL 8(5.8),

sudo apt-get remove --purge mysql-server
sudo apt-get remove --purge mysql-client
sudo apt-get remove --purge mysql-common
sudo apt-get autoremove

现在,尝试安装 MySQL 5.7 时出现以下错误。

$ sudo apt-get install mysql-server-5.7
Reading package lists... Done
Building dependency tree
Reading state information... Done
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-5.7 : PreDepends: mysql-common (>= 5.5)
                    Depends: mysql-client-5.7 (>= 5.7.22-0ubuntu0.17.10.1) but it is not going to be installed
                    Depends: mysql-common (>= 5.6.22-1~)
E: Unable to correct problems, you have held broken packages.

到目前为止一切都还顺利,

$ sudo apt-get autoremove
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

现在有人告诉我如何恢复 MySQL 5.7

apt-cache policy以下是使用if have xenialin安装 MySQL 5.7 的可行性状态sources.list

$ apt-cache policy mysql-server-5.7
mysql-server-5.7:
  Installed: (none)
  Candidate: (none)
  Version table:
     5.7.22-0ubuntu18.04.1 -1
        100 /var/lib/dpkg/status

如果我有Bionic Beaversources.list我会得到500

$ apt-cache policy mysql-server-5.7
mysql-server-5.7:
  Installed: (none)
  Candidate: 5.7.22-0ubuntu18.04.1
  Version table:
     5.7.22-0ubuntu18.04.1 500
        500 http://in.archive.ubuntu.com/ubuntu bionic-security/main amd64 Packages
        500 http://in.archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages
        100 /var/lib/dpkg/status
     5.7.21-1ubuntu1 500
        500 http://in.archive.ubuntu.com/ubuntu bionic/main amd64 Packages

基本上我尝试执行过一次,

$ sudo dpkg -i mysql-apt-config_0.8.10-1_all.deb

相关内容