2

I am not able to install mysql workbench on ubuntu 18.04. There is some dependency error. Following are the commands I have tried and their outputs

sudo apt install 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 install

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 install -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 autoremove

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

These commands gave no output

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

I also tried using aptitude instead of apt. I used synaptic package manager. Edit -> Fix Broken Packages. It shows "Successfully fixed dependency problems" at the bottom but problem still not solved.

Edit: I ran this command

apt-cache policy mysql-workbench

Output

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

Edit2: I ran this command

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

Output

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

Edit3 I ran this command

sudo apt install libgdal20

Output

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.

If I try to install any of the dependencies, the same error shows up again telling their dependencies. But isn't apt supposed to install all the dependencies on its own?

Edit 4: I ran this command

gedit /etc/apt/sources.list

Output https://paste.ubuntu.com/p/VncCrpPNHY/

Edit 5 I tried installing it with synaptic package manager. On clicking apply after marking mysql-workbench for installation, I got a dialogue box that says

Could not apply changes. Fix broken packages first.

On going to Edit -> Fix Broken Packages, I get a dialogue box that says

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

However if I just open synaptic and do Edit -> fix broken packages without marking MySQL workbench for installation, it says at the bottom "successfully fixed dependency problems".

I ran

sudo apt update

Output

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.

I ran

sudo apt list --upgradable

Output

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

I ran the above command with -a switch

sudo apt list --upgradable -a

Output

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]
  • Ah. I faced similar problems for MariaDB a long time back. I could neither get it to install the dependencies nor could I completely remove it. I suggest a fresh install if you dont have important databases. But maybe, try synaptic first. – Jdeep May 31 '21 at 18:58
  • @Jdeep fresh install of what, workbench? But this is the first time I am installing workbench – Nikhil Rathore Jun 01 '21 at 02:27
  • 1
    @NikhilRathore , I suggest use synaptic to reinstall the broken packages first – Jdeep Jun 01 '21 at 06:16
  • @NikhilRathore Go through this answer: https://askubuntu.com/a/1081938. It might help you. If you have any doubt, tag my username in your comment such that I'll be notified (like this: @RandomPerson). – Random Person Jun 03 '21 at 07:40
  • @RandomPerson I have given the link to content of gedit /etc/apt/sources.list. Could you please check what needs to be changed. I uncommented some lines and that didn't make any difference. – Nikhil Rathore Jun 06 '21 at 05:16
  • @NikhilRathore Your sources.list file looks fine to me. I don't know what exactly is the issue in your computer. I installed Ubuntu 18.04 in a VirtualBox and installed MySQL Workbench successfully. So, there is no issue with the package. Did you try to use Synaptic? If you are not sure how to use Synaptic to install MySQL Workbench, let me know. I will help you. Also, add the output of sudo apt update in your question. – Random Person Jun 06 '21 at 12:17
  • @RandomPerson I tried synaptic and have updated the question. please check edit 5. – Nikhil Rathore Jun 06 '21 at 15:53
  • 1
    Instant problem: gdal-abi-2-2-3 - wherever you got the MySQL Workbench installer from is not properly up to date or dependent on things that are not in the Ubuntu repositories at all - gdal-abi-2-2-3 isn't a valid package and therefore isn't a valid build dependency / install dependency. Given that gdal-abi-2-2-3 is in the requirements of the package for installation, and not available on the system, you either (1) have messed up repos, (2) are using an unsynced mirror, or (3) have a bad package. – Thomas Ward Jun 07 '21 at 13:43
  • 1
    Have you tried the version of the mysql workbench from the MySQL repos directly? Follow the MySQL team's instructions for setting up their repository, run sudo apt update and then do sudo apt install mysql-workbench-community - this may be better and supersede whatever problem is going on in the main repos with that package (sometimes using upstream developers' versions works better) – Thomas Ward Jun 07 '21 at 13:58
  • @ThomasWard I tried as you said in the above comment. sudo apt-get install mysql-workbench still gives same error. sudo apt install mysql-workbench-community says there is no apt package but there is a snap with that name. I have tried that before. It will get installed but due to broken dependency won't work properly. – Nikhil Rathore Jun 08 '21 at 16:42

0 Answers0