2

My system offered to upgrade from 19.04 so I let it but many errors. Now MySQL will not run. Running this in terminal:

Ran: sudo dpkg --remove --force-all mysql-community-client libmysqlclient21:amd64 mysql-common mysql-community-client-core

dpkg: mysql-community-client: dependency problems, but removing anyway as you requested:
 dbconfig-mysql depends on default-mysql-client | virtual-mysql-client; however:
  Package default-mysql-client is not installed.
  Package virtual-mysql-client is not installed.
  Package mysql-community-client which provides virtual-mysql-client is to be removed.

(Reading database ... 533508 files and directories currently installed.)
Removing mysql-community-client (8.0.18-1ubuntu19.10) ...
dpkg: libmysqlclient21:amd64: dependency problems, but removing anyway as you requested:
 libvtk6.3 depends on libmysqlclient21 (>= 8.0.11); however:
  Package libmysqlclient21:amd64 is to be removed.
 libsnmp30:amd64 depends on libmysqlclient21 (>= 8.0.11).
 libqt4-sql-mysql:amd64 depends on libmysqlclient21 (>= 8.0.11).
 libgdal20 depends on libmysqlclient21 (>= 8.0.11).

Removing libmysqlclient21:amd64 (8.0.18-1ubuntu19.10) ...
Removing mysql-common (8.0.18-1ubuntu19.10) ...
Removing mysql-community-client-core (8.0.18-1ubuntu19.10) ...
Processing triggers for man-db (2.8.7-3) ...
Processing triggers for libc-bin (2.30-0ubuntu2) ...

Then ran: sudo apt install -f

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... failed.
The following packages have unmet dependencies:
 dbconfig-mysql : Depends: default-mysql-client but it is not installed or
                           virtual-mysql-client
 libgdal20 : Depends: libmysqlclient21 (>= 8.0.11) but it is not installed
 libqt4-sql-mysql : Depends: libmysqlclient21 (>= 8.0.11) but it is not installed
 libsnmp30 : Depends: libmysqlclient21 (>= 8.0.11) but it is not installed
 libvtk6.3 : Depends: libmysqlclient21 (>= 8.0.11) but it is not installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
E: Unable to correct dependencies

Ran: sudo dpkg --remove --force-all dbconfig-mysql; apt-get download libmysqlclient21; sudo dpkg -i libmysqlclient21.deb; sudo apt install -f*

dpkg: dbconfig-mysql: dependency problems, but removing anyway as you requested:
 phpmyadmin depends on dbconfig-mysql | dbconfig-no-thanks | dbconfig-common (<< 2.0.0); however:
  Package dbconfig-mysql is to be removed.
  Package dbconfig-no-thanks is not installed.
  Version of dbconfig-common on system is 2.0.11ubuntu2.

(Reading database ... 533425 files and directories currently installed.)
Removing dbconfig-mysql (2.0.11ubuntu2) ...
Get:1 http://repo.mysql.com/apt/ubuntu eoan/mysql-8.0 amd64 libmysqlclient21 amd64 8.0.18-1ubuntu19.10 [1,281 kB]
Fetched 1,281 kB in 8s (152 kB/s)                                              
Selecting previously unselected package libmysqlclient21:amd64.
(Reading database ... 533424 files and directories currently installed.)
Preparing to unpack libmysqlclient21_8.0.18-1ubuntu19.10_amd64.deb ...
Unpacking libmysqlclient21:amd64 (8.0.18-1ubuntu19.10) ...
dpkg: dependency problems prevent configuration of libmysqlclient21:amd64:
 libmysqlclient21:amd64 depends on mysql-common (>= 8.0.18-1ubuntu19.10); however:
  Package mysql-common is not installed.

dpkg: error processing package libmysqlclient21:amd64 (--install):
 dependency problems - leaving unconfigured
Processing triggers for libc-bin (2.30-0ubuntu2) ...
Errors were encountered while processing:
 libmysqlclient21:amd64
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... failed.
The following packages have unmet dependencies:
 libmysqlclient21 : Depends: mysql-common (>= 8.0.18-1ubuntu19.10)
 phpmyadmin : Depends: dbconfig-mysql but it is not installed or
                       dbconfig-no-thanks but it is not installed or
                       dbconfig-common (< 2.0.0) but 2.0.11ubuntu2 is installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
E: Unable to correct dependencies

Another error that pops up occasionally is:

Error: GDBus.Error:org.freedesktop.systemd1.UnitMasked: Unit -.mount is masked.
2
  • I tried that already and it tells me to run apt --fix-broken install but that gives the error Correcting dependencies... failed that I already posted. I think the other question you're referring to was for a different PC as I have four with Ubuntu. So far, I upgraded two and both have had issues with the process, this one with MySQL and the other with booting and app installation.
    – DonP
    Nov 14, 2019 at 19:35
  • @Kulfy After following your suggestions and getting errors, they seemed somewhat minor so I rebooted the system. Once doing so, I ran sudo apt install mysql-server and it seemed to install and start up as though nothing had happened! I can't log into it yet but maybe that's due to the new login that I need to change to the legacy login type as I understand that there is a new one on v8.X. Since I'm not sure what actually fixed it, I am unsure how to write it as an official Answer but please feel free to do so. Thank you and everyone for your help!
    – DonP
    Nov 15, 2019 at 1:41

3 Answers 3

2

From comments:

  1. Remove MySQL related packages forcefully using dpkg:

    sudo dpkg --remove --force-all mysql-server mysql-community-client mysql-common mysql-community-client-core libmysqlclient20 libmysqlclient21 mysql-client mysql-community-server-core mysql-community-server
    
  2. Install MySQL again with APT:

    sudo apt install mysql-server
    
0

I fixed it by installing sudo apt install mysql-server first, and after that sudo apt install php-mysql. I know it's weird, but it works.

https://wiki.ubuntuusers.de/LAMP/

1
  • 1
    When trying to install, it tells me that the mysql-server is already the newest version (8.0.18-1ubuntu19.10). Both of the commands ask me if I want to continue and when I do, nothing is installed as it shows 0 as the amount of change.
    – DonP
    Oct 27, 2019 at 17:53
0

Run:

wget http://repo.mysql.com/mysql-apt-config_0.8.14-1_all.deb
sudo dpkg -i mysql-apt-config_0.8.14-1_all.deb

That will get you the latest package for Ubuntu Eoan (19.10).

On the install screen, choose the package:

setup

Finally, install the server:

sudo apt-get update
sudo apt-get install mysql-server

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.