安装 MySQL Workbench 时出错

安装 MySQL Workbench 时出错

我无法安装 MySQL Workbench。它显示以下错误:

 The following packages have unmet dependencies:

mysql-workbench: Depends: libgcc1 (>= 1:4.1.1) but 1:4.9.3-0ubuntu4 is to be installed
                 Depends: libgtkmm-2.4-1c2a (>= 1:2.24.0) but 1:2.24.4-1ubuntu1 is to be installed
                 Depends: libpcrecpp0 (>= 7.7) but 1:8.31-2ubuntu2.1 is to be installed
                 Depends: python:any (>= 2.7.1-0ubuntu2) but it is a virtual package
                 Depends: mysql-workbench-data (= 6.0.8+dfsg-2) but 6.0.8+dfsg-2 is to be nstalled

截屏

我该如何解决这个问题?我正在使用 Ubuntu 14.04 LTS

答案1

在安装 MySQL Workbench 之前,您需要安装所有依赖项。

尝试一下这个命令: sudo apt-get install libgcc1 libgtkmm-2.4-1c2a libpcrecpp0 python mysql-workbench-data

答案2

这是我的解决方案:

sudo apt-get update
sudo apt-get install mysql-client-5.5
sudo apt-get install mysql-client
sudo apt-get install mysql-workbench

我遇到了同样的问题,但我成功了。我必须通过命令行来完成。我认为导致我出现此问题的原因是我在安装任何其他 mysql 内容之前执行了 apt-get install mysql-client-5.6。

首先sudo apt-get update 然后我尝试 apt-get install mysql-workbench,但是我收到这个错误,它告诉我下一步。

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-workbench : Depends: mysql-client
E: Unable to correct problems, you have held broken packages.

所以我照做了,sudo apt-get install mysql-client但它给出了类似的错误,但告诉我我需要 mysql-client-5.5。所以我照做了sudo apt-get install mysql-client-5.5,它成功了。然后我安装了 mysql-client,它成功了。然后我安装了 mysql-workbench,它成功了!

PS 感谢 Sanchit。我做的第一件事就是按照 Sanchit 的回答去做:sudo apt-get install libgcc1 libgtkmm-2.4-1c2a libpcrecpp0 python mysql-workbench-data但我再次尝试通过 Ubuntu 软件中心安装,却出现了同样的错误。但现在,我不知道这是否是必要的步骤。那时我尝试通过命令行,认为这只是安装正确的软件包以满足依赖关系的问题。

答案3

我遇到了同样的错误,我sudo apt-get update在添加 APT 和工作台安装后遇到了同样的错误,但无法工作。我运行了这个命令:

sudo apt-get -f install并重新安装

sudo apt-get install mysql-workbench-community

并且它成功了。

相关内容