Ubuntu 14.04 中的 MySQL 5.6 安装问题

Ubuntu 14.04 中的 MySQL 5.6 安装问题

我曾经使用过 MySQL 5.5,并且尝试过多种方法升级到 MySQL 5.6,但是都没有正常工作。

当我做:

test@test:~$ sudo apt-get install phpmyadmin
[sudo] password for test: 
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-client-5.6 : Breaks: mysql-server-core-5.6 (< 5.6.22-1~) but 5.6.16-1~exp1 is to be installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.

当我尝试:

test@test:~$ sudo apt-get install mysql-server-core-5.6
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libdbd-mysql-perl libmysqlclient18 mysql-client-5.6 mysql-client-core-5.6
  mysql-common mysql-common-5.6
Use 'apt-get autoremove' to remove them.
The following packages will be upgraded:
  mysql-server-core-5.6
1 upgraded, 0 newly installed, 0 to remove and 378 not upgraded.
Need to get 0 B/4,940 kB of archives.
After this operation, 1,822 kB of additional disk space will be used.
(Reading database ... 229415 files and directories currently installed.)
Preparing to unpack .../mysql-server-core-5.6_5.6.35-1+deb.sury.org~trusty+0.1_amd64.deb ...
Unpacking mysql-server-core-5.6 (5.6.35-1+deb.sury.org~trusty+0.1) over (5.6.16-1~exp1) ...
dpkg: error processing archive /var/cache/apt/archives/mysql-server-core-5.6_5.6.35-1+deb.sury.org~trusty+0.1_amd64.deb (--unpack):
 trying to overwrite '/usr/bin/innochecksum', which is also in package mysql-client-5.6 5.6.33-0ubuntu0.14.04.1
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Errors were encountered while processing:
 /var/cache/apt/archives/mysql-server-core-5.6_5.6.35-1+deb.sury.org~trusty+0.1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

我怎样才能解决这个问题?

答案1

dpkg 错误表明 mysql-server-core-5.6_5.6.35-1+deb.sury.org~trusty+0.1_amd64.deb 正在尝试覆盖已由 mysql-client-5.6 5.6.33-0ubuntu0.14.04.1 包安装的“/usr/bin/innochecksum”。

您需要先使用以下命令删除 mysql-client-5.6 和其他相关包:

sudo apt-get autoremove然后安装 mysql-server 或 phpmysqladmin。

相关内容