无法在 ubuntu 14.04 上安装 mysql-client-core*?

无法在 ubuntu 14.04 上安装 mysql-client-core*?

我尝试在 ubuntu 14 上通过 apt-get 安装 mysql-client-core* ;但是失败了。

以下是我的操作系统:

xxx@ubuntu:~/pvz2/pvz2server/dockerfiles$ uname -a
Linux ubuntu 4.4.0-31-generic #50~14.04.1-Ubuntu SMP Wed Jul 13 01:07:32 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

安装信息:

xxx@ubuntu:~/pvz2/pvz2server/dockerfiles$  sudo apt-get install -y mysql-client-core*
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Note, selecting 'mysql-client-core-5.1' for regex 'mysql-client-core*'
Note, selecting 'mysql-client-core-5.5' for regex 'mysql-client-core*'
Note, selecting 'mysql-client-core-5.6' for regex 'mysql-client-core*'
Note, selecting 'virtual-mysql-client-core' for regex 'mysql-client-core*'
mysql-client-core-5.5 is already the newest version.
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-core-5.6 : Breaks: mysql-client-core-5.5 but 5.5.54-0ubuntu0.14.04.1 is to be installed
E: Unable to correct problems, you have held broken packages.

如果我使用:apt-get install mysql-client-core-5.6 或 mysql-client-core-5.5,可以成功安装,但无法连接mysql服务器。

mysql -h127.0.0.1 -uxxx -pxxx

ERROR 2003 (HY000): Can't connect to MySQL server on '127.0.0.1' (111)
ERROR 2003 (HY000): Can't connect to MySQL server on '127.0.0.1' (111)

我希望安装mysql-client-core-5.6而不是mysql-client-core-5.5。

谁能帮我 ?

答案1

我建议运行sudo apt-get clean && sudo apt-get autoclean && sudo apt-get autoremove && sudo apt-get update以清除系统中残留的旧软件包,然后更新源。然后安装程序。

相关内容