我想在 Debian 7 Wheezy 上安装 MySql 5.7。我把:
deb http://repo.mysql.com/apt/debian/ wheezy mysql-5.7
在文件中:
/etc/apt/sources.list.d/mysql.list
接下来我运行命令:
sudo apt-get update
sudo apt-get upgrade
并尝试安装包:
sudo apt-get install mysql-server-5.7
我遇到了一个错误:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'mysql-community-server' instead of 'mysql-server-5.7'
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-community-server : Depends: mysql-common (= 5.7.11-1debian7) but 5.5.47-0+deb7u1 is to be installed
Depends: mysql-client (= 5.7.11-1debian7)
E: Unable to correct problems, you have held broken packages.
你有解决这个问题的想法吗? 我也试过:
Note, selecting 'mysql-community-server' instead of 'mysql-server-5.7'
但这不是问题的解决方案。
最佳答案
我偶然发现了这篇文章,可以确认通过直接从 MySQL Downloads 下载 .deb
包来简单地更改缓存的优先级。
使用命令行:
$ cd /usr/src && sudo wget http://dev.mysql.com/get/mysql-apt-config_0.7.3-1_all.deb
Please note: by convension the /src directory on linux exists for source code to live before being compiled - I believe the deb package above therefore belongs here.
这适用于 Debian/Wheezy。
$ sudo dpkg -i http://dev.mysql.com/get/mysql-apt-config_0.7.3-1_all.deb
完成这些步骤后,只需点击 Ok
,然后像往常一样继续安装 mysql-server
:
$ sudo apt-update
$ sudo apt-get install mysql-server
对我来说,这导致了以下结果:
[info] MySQL Community Server 5.7.14 is started. Setting up mysql-server (5.7.14-1debian7) ...
进一步阅读,如果你想删除这个包,你可以这样做:
$ cd /usr/src && sudo dpkg --remove http://dev.mysql.com/get/mysql-apt-config_0.7.3-1_all.deb
关于mysql - 在 Debian 7 Wheezy 上安装 MySQL 5.7,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35274926/