在 Debian Wheezy 上安装 mysql-server 5.6

在 Debian Wheezy 上安装 mysql-server 5.6

我的 Debian 服务器上安装了一个混乱的 mysql。我使用我能找到的任何 mysql 数据包删除了所有内容dpkg --force all --purge packet(mysql-common、mysql-server、mysql-client、phpmyadmin 等..)

现在我虽然重新安装很容易,但是我遇到了以下错误消息:

sudo apt-get install mysql-server
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 : Depends: mysql-server-5.6 but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

令我困扰的是我似乎没有持有包裹,dpkg --get-selections | grep hold也没有退回任何东西。

我也尝试过 aptitude:

sudo aptitude install mysql-server
The following NEW packages will be installed:
  libaio1{a} libdbd-mysql-perl{ab} libdbi-perl{ab} libmysqlclient18{a} mysql-client-5.6{a} mysql-client-core-5.6{a} mysql-common{a} mysql-common-5.6{a} mysql-server 
  mysql-server-5.6{a} mysql-server-core-5.6{a} 
0 packages upgraded, 11 newly installed, 0 to remove and 0 not upgraded.
Need to get 40,6 MB/47,5 MB of archives. After unpacking 155 MB will be used.
The following packages have unmet dependencies:
 libdbd-mysql-perl : Depends: perlapi-5.14.2 which is a virtual package.
 libdbi-perl : Depends: perlapi-5.14.2 which is a virtual package.
The following actions will resolve these dependencies:

     Keep the following packages at their current version:
1)     libdbd-mysql-perl [Not Installed]                  
2)     libdbi-perl [Not Installed]                        
3)     mysql-client-5.6 [Not Installed]                   
4)     mysql-server [Not Installed]                       
5)     mysql-server-5.6 [Not Installed]  

然而,正如你所看到的,它没有安装任何东西..

我现在陷入困境,找不到如何获得可用的 MySQL 服务器。非常感谢任何帮助。

答案1

第一次运行:

aptitude -f install

然后创建mysql.list文件:

 nano /etc/apt/sources.list.d/mysql.list

添加以下行:

deb http://repo.mysql.com/apt/debian/ wheezy mysql-5.6
deb-src http://repo.mysql.com/apt/debian/ wheezy mysql-5.6

更新并安装mysql 5.6:

apt-get update
apt-get install mysql-server-5.6

相关内容