0

Yesterday i tried to install mysql-workbench on Ubuntu 20.04 and the installation failed. The problem is that some packages installed with unmet dependencies:

sudo apt-get upgrade 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 libmysqlclient21 : Depends: mysql-common (>= 8.0.27-1ubuntu21.10) but 5.8+1.0.5ubuntu2 is installed
                    Depends: mysql-community-client-plugins (= 8.0.27-1ubuntu21.10) but it is not installable
                    Depends: libc6 (>= 2.34) but 2.31-0ubuntu9.2 is installed
                    Depends: libstdc++6 (>= 11) but 10.3.0-1ubuntu1~20.04 is installed
 mysql-workbench-community : Depends: libopengl0 but it is not installed
                             Depends: libproj15 (>= 6.3.0) but it is not installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

I tried the recommended command:

sudo apt --fix-broken install
E: Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root?

And then i tried some commands that i found:

    sudo dpkg -r libmysqlclient21
dpkg: dependency problems prevent removal of libmysqlclient21:amd64:
 mysql-workbench-community depends on libmysqlclient21 (>= 8.0.11).
 libsnmp35:amd64 depends on libmysqlclient21 (>= 8.0.11).

dpkg: error processing package libmysqlclient21:amd64 (--remove): dependency problems - not removing Errors were encountered while processing: libmysqlclient21:amd64


    sudo dpkg -r mysql-common
dpkg: dependency problems prevent removal of mysql-common:
 libmysqlclient21:amd64 depends on mysql-common (>= 8.0.27-1ubuntu21.10).

dpkg: error processing package mysql-common (--remove): dependency problems - not removing Errors were encountered while processing: mysql-common


    sudo dpkg --configure -a
dpkg: dependency problems prevent configuration of mysql-workbench-community:
 mysql-workbench-community depends on libmysqlclient21 (>= 8.0.11); however:
  Package libmysqlclient21:amd64 is not configured yet.
 mysql-workbench-community depends on libopengl0; however:
  Package libopengl0 is not installed.
 mysql-workbench-community depends on libproj15 (>= 6.3.0); however:
  Package libproj15 is not installed.

dpkg: error processing package mysql-workbench-community (--configure): dependency problems - leaving unconfigured Errors were encountered while processing: mysql-workbench-community

But as you can see nothing worked for me. Please somebody help me because i can't understand what is going wrong.

==============================Edited=================================

sudo apt update
Hit:1 http://gr.archive.ubuntu.com/ubuntu focal InRelease
Get:2 http://gr.archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB]
Get:3 http://dl.google.com/linux/chrome/deb stable InRelease [1,811 B]         
Get:4 http://security.ubuntu.com/ubuntu focal-security InRelease [114 kB]      
Get:5 http://gr.archive.ubuntu.com/ubuntu focal-backports InRelease [101 kB]
Get:6 http://dl.google.com/linux/chrome/deb stable/main amd64 Packages [1,097 B]
Get:7 http://gr.archive.ubuntu.com/ubuntu focal-updates/main i386 Packages [562 kB]
Get:8 http://security.ubuntu.com/ubuntu focal-security/main amd64 Packages [987 kB]
Get:9 http://gr.archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages [1,344 kB]
Get:10 http://gr.archive.ubuntu.com/ubuntu focal-updates/main Translation-en [276 kB]
Get:11 http://gr.archive.ubuntu.com/ubuntu focal-updates/main amd64 DEP-11 Metadata [279 kB]
Get:12 http://gr.archive.ubuntu.com/ubuntu focal-updates/main DEP-11 48x48 Icons [60.8 kB]
Get:13 http://gr.archive.ubuntu.com/ubuntu focal-updates/main DEP-11 64x64 Icons [98.3 kB]
Get:14 http://gr.archive.ubuntu.com/ubuntu focal-updates/main amd64 c-n-f Metadata [14.4 kB]
Get:15 http://gr.archive.ubuntu.com/ubuntu focal-updates/restricted amd64 Packages [569 kB]
Get:16 http://security.ubuntu.com/ubuntu focal-security/main i386 Packages [306 kB]
Get:17 http://gr.archive.ubuntu.com/ubuntu focal-updates/restricted i386 Packages [21.7 kB]
Get:18 http://gr.archive.ubuntu.com/ubuntu focal-updates/restricted Translation-en [81.6 kB]
Get:19 http://gr.archive.ubuntu.com/ubuntu focal-updates/restricted amd64 c-n-f Metadata [528 B]
Get:20 http://gr.archive.ubuntu.com/ubuntu focal-updates/universe i386 Packages [647 kB]
Get:21 http://security.ubuntu.com/ubuntu focal-security/main Translation-en [183 kB]
Get:22 http://security.ubuntu.com/ubuntu focal-security/main amd64 DEP-11 Metadata [29.0 kB]
Get:23 http://security.ubuntu.com/ubuntu focal-security/main amd64 c-n-f Metadata [8,844 B]
Get:24 http://security.ubuntu.com/ubuntu focal-security/restricted i386 Packages [20.4 kB]
Get:25 http://security.ubuntu.com/ubuntu focal-security/restricted amd64 Packages [526 kB]
Get:26 http://gr.archive.ubuntu.com/ubuntu focal-updates/universe amd64 Packages [875 kB]
Get:27 http://gr.archive.ubuntu.com/ubuntu focal-updates/universe Translation-en [189 kB]
Get:28 http://gr.archive.ubuntu.com/ubuntu focal-updates/universe amd64 DEP-11 Metadata [357 kB]
Get:29 http://security.ubuntu.com/ubuntu focal-security/restricted Translation-en [75.4 kB]
Get:30 http://gr.archive.ubuntu.com/ubuntu focal-updates/universe DEP-11 48x48 Icons [217 kB]
Get:31 http://gr.archive.ubuntu.com/ubuntu focal-updates/universe DEP-11 64x64 Icons [385 kB]
Get:32 http://security.ubuntu.com/ubuntu focal-security/restricted amd64 c-n-f Metadata [528 B]
Get:33 http://security.ubuntu.com/ubuntu focal-security/universe i386 Packages [515 kB]
Get:34 http://gr.archive.ubuntu.com/ubuntu focal-updates/universe amd64 c-n-f Metadata [19.5 kB]
Get:35 http://gr.archive.ubuntu.com/ubuntu focal-updates/multiverse amd64 Packages [24.5 kB]
Get:36 http://gr.archive.ubuntu.com/ubuntu focal-updates/multiverse i386 Packages [8,204 B]
Get:37 http://gr.archive.ubuntu.com/ubuntu focal-updates/multiverse amd64 DEP-11 Metadata [940 B]
Get:38 http://gr.archive.ubuntu.com/ubuntu focal-updates/multiverse amd64 c-n-f Metadata [616 B]
Get:39 http://gr.archive.ubuntu.com/ubuntu focal-backports/universe i386 Packages [5,528 B]
Get:40 http://gr.archive.ubuntu.com/ubuntu focal-backports/universe amd64 Packages [6,584 B]
Get:41 http://gr.archive.ubuntu.com/ubuntu focal-backports/universe amd64 DEP-11 Metadata [10.4 kB]
Get:42 http://gr.archive.ubuntu.com/ubuntu focal-backports/universe DEP-11 64x64 Icons [5,608 B]
Get:43 http://gr.archive.ubuntu.com/ubuntu focal-backports/universe amd64 c-n-f Metadata [580 B]
Get:44 http://security.ubuntu.com/ubuntu focal-security/universe amd64 Packages [651 kB]
Get:45 http://security.ubuntu.com/ubuntu focal-security/universe Translation-en [107 kB]
Get:46 http://security.ubuntu.com/ubuntu focal-security/universe amd64 DEP-11 Metadata [63.6 kB]
Get:47 http://security.ubuntu.com/ubuntu focal-security/universe amd64 c-n-f Metadata [12.8 kB]
Get:48 http://security.ubuntu.com/ubuntu focal-security/multiverse i386 Packages [7,212 B]
Get:49 http://security.ubuntu.com/ubuntu focal-security/multiverse amd64 Packages [21.9 kB]
Get:50 http://security.ubuntu.com/ubuntu focal-security/multiverse amd64 DEP-11 Metadata [2,464 B]
Get:51 http://security.ubuntu.com/ubuntu focal-security/multiverse amd64 c-n-f Metadata [540 B]
Fetched 9,908 kB in 8s (1,293 kB/s)                                            
Reading package lists... Done
Building dependency tree       
Reading state information... Done
33 packages can be upgraded. Run 'apt list --upgradable' to see them.

==========================Listed Packages============================

sudo apt list --installed | grep mysql

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

libmysqlclient21/now 8.0.27-1ubuntu21.10 amd64 [installed,local] mysql-common/now 5.8+1.0.5ubuntu2 all [installed,local] mysql-workbench-community/now 8.0.27-1ubuntu20.04 amd64 [installed,local]

Thank you in advance. Omiros Athanasakis

  • 1
    E: Could not open lock file means there is a process using it. Wait and try again. If it's been 30 minutes, reboot and try again – Nmath Nov 09 '21 at 22:32
  • @Nmath what do you mean where is that even written the problem is that he is running apt fix broken without "sudo" that is causing error – Error404 Nov 10 '21 at 09:30
  • Run sudo apt --fix-broken install – Error404 Nov 10 '21 at 09:30
  • @OmirosAthanasakis Run sudo apt --fix-broken install – Error404 Nov 10 '21 at 09:32
  • @Nmath i tried it and nothing changed. Thank you for answering. – Omiros Athanasakis Nov 10 '21 at 23:13
  • @Algnis i am really sorry it's a typo, of course i run all these type of commands with the "sudo" keyword, Thank you for answering. – Omiros Athanasakis Nov 10 '21 at 23:13
  • In your output, Depends: mysql-common (>= 8.0.27-1ubuntu21.10) that version number is suspicious; the highest version in the Ubuntu repositories is 5.8+1.0.5ubuntu2. Please edit your question to include the complete output of sudo apt update. – user535733 Nov 10 '21 at 23:20
  • @user535733 i included the output – Omiros Athanasakis Nov 11 '21 at 14:19
  • Are you following any kind of instructions to install mysql-workbench? If so, a link to those instructions would be very helpful. – user535733 Nov 11 '21 at 16:59
  • @user535733 https://youtu.be/7_YrwTOPl9w I followed the steps from the video. – Omiros Athanasakis Nov 12 '21 at 01:53
  • That video simply shows how to download the package from upstream (rather than use the version in the Ubuntu repositories), followed by a rather needlessly indirect method of handling the dependencies. Please add that information to your question above. – user535733 Nov 12 '21 at 03:45
  • Your output shows that you already had version 5 installed (which is a case not handled by the video). You failed to uninstall it before following those instructions. That's the first dependency problem you encountered, and that failure cascaded to cause other failures. Go back and uninstall version 5, then try your install again. – user535733 Nov 12 '21 at 03:48
  • @user535733 I tried but the message is the same... I searched on google but i can't find a way to solve my problem. I think that i have to do a format because of these – Omiros Athanasakis Nov 24 '21 at 00:43

0 Answers0