在 ubuntu 18.04 上安装 MySql workbench 时出现问题

在 ubuntu 18.04 上安装 MySql workbench 时出现问题

我无法在 ubuntu 18.04 上安装 mysql workbench。存在一些依赖项错误。以下是我尝试过的命令及其输出

sudo apt 安装 mysql-workbench

Reading package lists... Done
Building dependency tree       
Reading state information... Done
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: gdal-abi-2-2-3
                   Depends: libgdal20 (>= 2.0.1) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

sudo apt--fix-broken 安装

Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.

sudo apt-get dist-upgrade

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
  libodbc1 wine-stable
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.

sudo apt-get 安装 -f

Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.

sudo apt-get 自动删除

Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.

这些命令没有输出

dpkg --get-selections | grep hold`
sudo dpkg --configure -a
apt-mark showhold 

我也尝试过使用 aptitude 而不是 apt。我使用了 synaptic 包管理器。编辑 -> 修复损坏的包。底部显示“成功修复依赖性问题”,但问题仍未解决。

编辑: 我运行了这个命令

apt-cache policy mysql-workbench

输出

mysql-workbench:
  Installed: (none)
  Candidate: 6.3.8+dfsg-1build3
  Version table:
     6.3.8+dfsg-1build3 500
        500 http://in.archive.ubuntu.com/ubuntu bionic/universe amd64 Packages

编辑2:我运行了这个命令

apt-cache policy gdal-abi-2-2-3 libgdal20

输出

gdal-abi-2-2-3:
  Installed: (none)
  Candidate: (none)
  Version table:
libgdal20:
  Installed: (none)
  Candidate: 2.2.3+dfsg-2
  Version table:
     2.2.3+dfsg-2 500
        500 http://in.archive.ubuntu.com/ubuntu bionic/universe amd64 Packages

编辑3我运行了这个命令

sudo apt install libgdal20

输出

Reading package lists... Done
Building dependency tree       
Reading state information... Done
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:
 libgdal20 : Depends: libarmadillo8 but it is not going to be installed
             Depends: libhdf5-100 but it is not going to be installed
             Depends: libnetcdf13 (>= 4.0.1) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

如果我尝试安装任何依赖项,则会再次出现相同的错误,提示其依赖项。但是 apt 不是应该自行安装所有依赖项吗?

编辑4:我运行了这个命令

gedit /etc/apt/sources.list

输出 https://paste.ubuntu.com/p/VncCrpPNHY/

编辑5 我尝试使用 synaptic 包管理器安装它。在标记 mysql-workbench 进行安装后单击“应用”,出现一个对话框,提示

Could not apply changes. Fix broken packages first.

当我进入“编辑”->“修复损坏的软件包”时,出现一个对话框,上面写着

E: Unable to correct problems, you have held broken packages.
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
E: Unable to correct dependencies
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
E: Unable to correct dependencies

但是,如果我只是打开 synaptic 并执行“编辑”->“修复损坏的软件包”而不标记 MySQL workbench 进行安装,它会在底部显示“成功修复依赖性问题”。

我跑了

sudo apt update

输出

Hit:1 http://packages.microsoft.com/repos/code stable InRelease
Hit:2 http://in.archive.ubuntu.com/ubuntu bionic InRelease                     
Hit:3 http://dl.google.com/linux/chrome/deb stable InRelease                   
Hit:4 http://ppa.launchpad.net/linuxuprising/java/ubuntu bionic InRelease      
Hit:5 https://packages.microsoft.com/ubuntu/18.04/prod bionic InRelease        
Hit:6 https://repo.skype.com/deb stable InRelease                              
Hit:7 https://debrepo.freedownloadmanager.org bionic InRelease                 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
1 package can be upgraded. Run 'apt list --upgradable' to see it.

我跑了

sudo apt list --upgradable

输出

Listing... Done
libodbc1/bionic 2.3.7 amd64 [upgradable from: 2.3.4-1.1ubuntu3]
N: There is 1 additional version. Please use the '-a' switch to see it

我使用 -a 开关运行了上述命令

sudo apt list --upgradable -a

输出

Listing... Done
libodbc1/bionic 2.3.7 amd64 [upgradable from: 2.3.4-1.1ubuntu3]
libodbc1/bionic,now 2.3.4-1.1ubuntu3 amd64 [installed,upgradable to: 2.3.7]

相关内容