So, I type "apt install mysql-server-8.0" and it comes back with:
Building dependency tree
Reading state information... Done
Suggested packages:
tinyca
The following packages will be upgraded:
mysql-server-8.0
1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
Need to get 0 B/1,249 kB of archives.
After this operation, 20.5 kB of additional disk space will be used.
Preconfiguring packages ...
(Reading database ... 306894 files and directories currently installed.)
Preparing to unpack .../mysql-server-8.0_8.0.21-0ubuntu0.20.04.3_amd64.deb ...
Failed to stop mysql.service: Unit mysql.service not loaded.
invoke-rc.d: initscript mysql, action "stop" failed.
dpkg: warning: old mysql-server-8.0 package pre-removal script subprocess returned error exit status 1
dpkg: trying script from the new package instead ...
Failed to stop mysql.service: Unit mysql.service not loaded.
invoke-rc.d: initscript mysql, action "stop" failed.
dpkg: error processing archive /var/cache/apt/archives/mysql-server-8.0_8.0.21-0ubuntu0.20.04.3_amd64.deb (--unpack):
new mysql-server-8.0 package pre-removal script subprocess returned error exit status 1
Failed to stop mysql.service: Unit mysql.service not loaded.
invoke-rc.d: initscript mysql, action "stop" failed.
Failed to start mysql.service: Unit mysql.service not found.
invoke-rc.d: initscript mysql, action "start" failed.
Unit mysql.service could not be found.
dpkg: error while cleaning up:
installed mysql-server-8.0 package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
/var/cache/apt/archives/mysql-server-8.0_8.0.21-0ubuntu0.20.04.3_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
I've tried uninstalling, reinstalling, installing. Nothing works. I moved the related .deb
files to /tmp
from /var/cache/apt/archives/
and still I cannot get this outta my system. mysql 5.7 appears to still be on this machine and attempting to remove that results in the same errors. I'm at my witts end. Google is no help (followed many a directions, including the one here: https://itsfoss.com/dpkg-returned-an-error-code-1/ to no avail).
So I did: dpkg --configure -a
and it spits back:
dpkg: dependency problems prevent configuration of mysql-server-8.0:
mysql-server-8.0 depends on mysql-server-core-8.0 (= 8.0.20-0ubuntu0.20.04.1); however:
Version of mysql-server-core-8.0 on system is 8.0.21-0ubuntu0.20.04.3.
dpkg: error processing package mysql-server-8.0 (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
mysql-server-8.0
Ubuntu 20.04 LTS