安裝 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

它起作用了。

相關內容