无法在Ubuntu 14.04上安装MySQL - mysql-client libmysqlclient-dev

时间:2016-03-29 07:05:03

标签: mysql ubuntu

您好我正在尝试在我的机器上安装mysql服务器和客户端(Ubuntu 14.04) 我正在运行以下命令:

sudo apt-get install mysql-server mysql-client libmysqlclient-dev

但是当我安装mysql客户端的机器

时,我收到以下错误
Reading package lists... Done
Building dependency tree  
Reading state information... Done
mysql-server 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:
 libmysqlclient-dev : Depends: libmysqlclient18 (= 5.5.47-0ubuntu0.14.04.1) but 10.0.24+maria-1~trusty is to be installed
W: Duplicate sources.list entry http://dl.google.com/linux/chrome/deb/ stable/main i386 Packages (/var/lib/apt/lists/dl.google.com_linux_chrome_deb_dists_stable_main_binary-i386_Packages)
W: You may want to run apt-get update to correct these problems
E: Unable to correct problems, you have held broken packages.

请帮我安装mysql

1 个答案:

答案 0 :(得分:0)

我跑了sudo apt-get install -f libmysqlclient18=5.5.47-0ubuntu0.14.04.1,它对我有用。

对于不同版本的强制安装,我认为您只需要明确显示需要作为依赖项安装的软件包的版本。 E.g。

  

从错误日志中

     

以下软件包具有未满足的依赖项:    libmysqlclient-dev:取决于: libmysqlclient18 (= 5.5.47-0ubuntu0.14.04.1 ),但要安装10.0.24 + maria-1~trusty

将您作为依赖项 libmysqlclient18 = 5.5.47-0ubuntu0.14.04.1

相关问题