在 ubuntu 12.04 上安装 mysql workbench 时出现依赖错误

问题描述 投票:0回答:8

我正在尝试安装 mysql workbench。我遇到以下错误。它似乎在某个默认目录中查找 mysql。我已经安装了所有必需的东西,但没有安装在 mysqlworkbench 期望的位置。出路何在!

local@host:/var/www/$ sudo apt-get -f install mysql-workbench
Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
 mysql-workbench : Depends: libctemplate0 but it is not going to be installed
                   Depends: libgtkmm-2.4-1c2a (>= 1:2.24.0) but it is not going to be installed
                   Depends: libmysqlclient18 (>= 5.5.13-1) but it is not going to be installed
                   Depends: libtinyxml2.6.2 but it is not going to be installed
                   Depends: libzip2 (>= 0.10) but it is not going to be installed
                   Depends: mysql-workbench-data (= 5.2.38+dfsg-3) but it is not going to be installed
                   Depends: mysql-client
                   Depends: python-mysql.connector but it is not going to be installed
                   Depends: python-paramiko but it is not going to be installed
                   Depends: python-pysqlite2 but it is not going to be installed
                   Depends: python-all but it is not going to be installed
                   Recommends: ttf-bitstream-vera but it is not going to be installed
                   Recommends: mysql-utilities but it is not installable
 mysql-workbench-community : Depends: libctemplate2 but it is not installable
                             Depends: libglib2.0-0 (>= 2.35.9) but 2.32.3-0ubuntu1 is to be installed
                             Depends: libglibmm-2.4-1c2a (>= 2.33.13) but 2.32.0-0ubuntu1 is to be installed
                             Depends: libgtkmm-2.4-1c2a (>= 1:2.24.0) but it is not going to be installed
                             Depends: libmysqlclient18 (>= 5.5.13-1) but it is not going to be installed
                             Depends: libpcrecpp0 (>= 7.7) but it is not going to be installed
                             Depends: libtinyxml2.6.2 but it is not going to be installed
                             Depends: libzip2 (>= 0.10) but it is not going to be installed
                             Depends: python-paramiko but it is not going to be installed
                             Depends: mysql-client
                             Depends: python-pysqlite2 but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
mysql linux ubuntu mysql-workbench
8个回答
19
投票

你可能跑了

dpkg -i mysql-workbench.deb

这不起作用,因为 dpkg 无法解析依赖关系,现在 MySQL Workbench 的安装已损坏。改为运行此命令:

sudo apt-get -f install

之后 MySQL Workbench 应该就安装好了。

另请记住,我们提供 Ubuntu 下载(从下拉列表中选择 Ubuntu Linux)。


6
投票

再次尝试安装,让它失败并运行第二个命令:

sudo apt-get -f install mysql-workbench
sudo apt --fix-broken install

这对我尝试在 ubuntu 18.04 上安装 mysql 5.7 的类似问题起到了作用。这个问题出现在我的机器上,因为我首先尝试使用 DEB 包安装 mysql,然后尝试从 mysql 的 apt 存储库安装它。


2
投票

我遇到了同样的问题,但以下方法对我有用。

sudo apt-get update
然后
sudo apt-get install mysql-workbench
使用此链接了解更多详细信息 - http://dev.mysql.com/doc/mysql-apt-repo-quick-guide/en/#apt-repo-fresh-install


1
投票

安装失败后我使用

sudo apt --fix-broken install

一切都按预期进行


1
投票

下载mysql-workbench-community_8.0.29-1ubuntu20.04_amd64.deb

来自 https://downloads.mysql.com/archives/workbench/ ...不是 mysql-workbench-community-dbgsym...!!!

选择与您的 Linux 版本匹配的版本

sudo apt-get update
sudo apt --fix-broken install
sudo apt install gnome-keyring libproj-dev libpcrecpp0v5
sudo dpkg -i mysql-workbench-community_8.0.29-1ubuntu20.04_amd64.deb

0
投票

如果错误是: 以下软件包具有未满足的依赖关系: mysql-workbench :取决于:gdal-abi-2-1-2 更新包树不会执行任何操作。

注意:这是一组可以尝试的想法(所以答案不完整,但我认为它可以帮助一些)[我没有时间测试所有选项](当我这样做时我会更新)

解决方案是下载该软件包并从 https://debian.pkgs.org/9/debian-main-amd64/libgdal20_2.1.2+dfsg-5_amd64.deb.html 直接下载链接 http://ftp.br.debian.org/debian/pool/main/g/gdal/libgdal20_2.1.2+dfsg-5_amd64.deb

sudo apt install ./libgdal20_2.1.2+dfsg-5_amd64.deb  # and that being in the download folder

请注意,这将降级 libgdal20,至少在我的情况下:

The following packages will be REMOVED:
  blender frei0r-plugins libopencv-calib3d3.2 libopencv-contrib3.2 libopencv-features2d3.2 libopencv-highgui3.2 libopencv-imgcodecs3.2
  libopencv-objdetect3.2 libopencv-stitching3.2 libopencv-superres3.2 libopencv-videoio3.2 libopencv-videostab3.2 libopencv-viz3.2 libopenimageio1.8
  libvtk6.3
The following NEW packages will be installed:
  libarmadillo7 libdap23 libnetcdf11 libproj12 libxerces-c3.1
The following packages will be DOWNGRADED:
  libgdal20

你可以在这里看到要移除多少包裹,帮我搅拌其中一个。所以检查一下你是否想这样做。 之后你应该可以很好地安装工作台(还没有尝试过,只是认为它会起作用,我不想卸载搅拌机)。

还有一个办法,不太放心,就是从官网安装最新版本,获取for ubuntu的包。 https://dev.mysql.com/downloads/workbench/。 安装到现在都运行良好。您将收到一条有关系统的消息,警告可能会发生错误。您可以选择不再看到该消息。

最后一种方式,从源代码安装,我目前没有时间,所以一旦完成我就会更新。我认为这将是最好的选择,作为学习新事物的好方法。一旦我这样做了,我会更新并写一个教程。


0
投票

对我来说这个命令有效

sudo apt-get -f install ./mysql-workbench-community-dbgsym_8.0.28-1ubuntu20.04_amd64.deb

0
投票
  1. 安装mysql apt存储库
  2. 奔跑
    sudo apt-get update
  3. 奔跑
    sudo apt-get install mysql-workbench-community
© www.soinside.com 2019 - 2024. All rights reserved.