package mysql-server-8.0 8.0.21-0ubuntu0.20.04.4 failed to install/upgrade: new mysql-server-8.0 package pre-removal script subprocess returned error exit status 1

Bug #1949468 reported by Colin Hopkins
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
mysql-8.0 (Ubuntu)
Expired
Undecided
Unassigned

Bug Description

trying install prtonvpn which I have account for. I downloaded the package to downloads, following instructions on ProtonVPN website. Then ran sudo apt-get install update, which was fine. Then tried to run sudo apt-get install protonvpn:

Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package protonvpn

I tried then:
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.
 mysql-server-8.0 : Depends: mysql-server-core-8.0 (= 8.0.21-0ubuntu0.20.04.4) but 8.0.22-0ubuntu0.20.04.2 is installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

So I tried that:

sudo apt --fix-broken install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following additional packages will be installed:
  mysql-client-8.0 mysql-server-8.0 mysql-server-core-8.0
Suggested packages:
  mailx tinyca
The following packages will be upgraded:
  mysql-client-8.0 mysql-server-8.0 mysql-server-core-8.0
3 to upgrade, 0 to newly install, 0 to remove and 486 not to upgrade.
14 not fully installed or removed.
Need to get 19.8 MB of archives.
After this operation, 12.0 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://gb.archive.ubuntu.com/ubuntu focal-updates/main amd64 mysql-client-8.0 amd64 8.0.27-0ubuntu0.20.04.1 [22.0 kB]
Get:2 http://gb.archive.ubuntu.com/ubuntu focal-updates/main amd64 mysql-server-8.0 amd64 8.0.27-0ubuntu0.20.04.1 [1,313 kB]
Get:3 http://gb.archive.ubuntu.com/ubuntu focal-updates/main amd64 mysql-server-core-8.0 amd64 8.0.27-0ubuntu0.20.04.1 [18.4 MB]
Fetched 19.8 MB in 12s (1,589 kB/s)
Preconfiguring packages ...
(Reading database ... 194809 files and directories currently installed.)
Preparing to unpack .../mysql-client-8.0_8.0.27-0ubuntu0.20.04.1_amd64.deb ...
Unpacking mysql-client-8.0 (8.0.27-0ubuntu0.20.04.1) over (8.0.22-0ubuntu0.20.04
.2) ...
Preparing to unpack .../mysql-server-8.0_8.0.27-0ubuntu0.20.04.1_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 return
ed 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.27-0
ubuntu0.20.04.1_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
Preparing to unpack .../mysql-server-core-8.0_8.0.27-0ubuntu0.20.04.1_amd64.deb
...
Unpacking mysql-server-core-8.0 (8.0.27-0ubuntu0.20.04.1) over (8.0.22-0ubuntu0.
20.04.2) ...
Errors were encountered while processing:
 /var/cache/apt/archives/mysql-server-8.0_8.0.27-0ubuntu0.20.04.1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

The system prompted to send a bug report , I said yes.
Release:
Description: Ubuntu 20.04.1 LTS
Release: 20.04

Thanks so much for your time

ProblemType: Package
DistroRelease: Ubuntu 20.04
Package: mysql-server-8.0 8.0.21-0ubuntu0.20.04.4
ProcVersionSignature: Ubuntu 5.4.0-52.57-generic 5.4.65
Uname: Linux 5.4.0-52-generic x86_64
ApportVersion: 2.20.11-0ubuntu27.10
AptOrdering:
 mysql-client-8.0:amd64: Install
 mysql-server-8.0:amd64: Install
 mysql-server-core-8.0:amd64: Install
 NULL: ConfigurePending
Architecture: amd64
CasperMD5CheckResult: skip
Date: Tue Nov 2 12:18:30 2021
DpkgHistoryLog:
 Start-Date: 2021-11-02 12:18:28
 Commandline: apt --fix-broken install
 Requested-By: colin (1000)
 Upgrade: mysql-client-8.0:amd64 (8.0.22-0ubuntu0.20.04.2, 8.0.27-0ubuntu0.20.04.1), mysql-server-8.0:amd64 (8.0.21-0ubuntu0.20.04.4, 8.0.27-0ubuntu0.20.04.1), mysql-server-core-8.0:amd64 (8.0.22-0ubuntu0.20.04.2, 8.0.27-0ubuntu0.20.04.1)
ErrorMessage: new mysql-server-8.0 package pre-removal script subprocess returned error exit status 1
InstallationDate: Installed on 2020-07-28 (462 days ago)
InstallationMedia: Ubuntu 20.04 LTS "Focal Fossa" - Release amd64 (20200423)
Logs.var.log.daemon.log:

Logs.var.log.mysql.error.log:
MySQLConf.etc.mysql.conf.d.mysql.cnf: [mysql]
MySQLConf.etc.mysql.conf.d.mysqldump.cnf:
 [mysqldump]
 quick
 quote-names
 max_allowed_packet = 16M
MySQLVarLibDirListing: ['binlog.index', 'mysql.ibd', 'mysql', 'binlog.000002', 'undo_001', 'sys', '#innodb_temp', 'private_key.pem', 'debian-10.3.flag', '#ib_16384_0.dblwr', 'aria_log_control', 'testdb', 'client-cert.pem', '#ib_16384_1.dblwr', 'ca-key.pem', 'performance_schema', 'undo_002', 'ib_logfile0', 'public_key.pem', 'server-cert.pem', 'ibdata1', 'binlog.000004', 'ca.pem', 'binlog.000003', 'client-key.pem', 'aria_log.00000001', 'ib_buffer_pool', 'ib_logfile1', 'auto.cnf', 'binlog.000001', 'server-key.pem']
ProcCmdline: BOOT_IMAGE=/boot/vmlinuz-5.4.0-52-generic root=UUID=be66e4af-c91c-488f-b203-16181076f1c5 ro quiet splash vt.handoff=7
Python3Details: /usr/bin/python3.8, Python 3.8.5, python3-minimal, 3.8.2-0ubuntu2
PythonDetails: N/A
RelatedPackageVersions:
 dpkg 1.19.7ubuntu3
 apt 2.0.2ubuntu0.1
SourcePackage: mysql-8.0
Title: package mysql-server-8.0 8.0.21-0ubuntu0.20.04.4 failed to install/upgrade: new mysql-server-8.0 package pre-removal script subprocess returned error exit status 1
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Colin Hopkins (thenumenorian) wrote :
Revision history for this message
Athos Ribeiro (athos-ribeiro) wrote :

Thank you for taking the time to file a bug report.

Are you able to reproduce the issue?

It would be nice if you could include additional logs and a list of packages you currently have installed in your system.

In the meanwhile (as a workaround), you could try enabling the mysql service and retry the operation.

Since there is not enough information in your report to begin triage or to
differentiate between a local configuration problem and a bug in Ubuntu, I
am marking this bug as "Incomplete". We would be grateful if you would:
provide a more complete description of the problem, explain why you
believe this is a bug in Ubuntu rather than a problem specific to your
system, and then change the bug status back to "New".

For local configuration issues, you can find assistance here:
http://www.ubuntu.com/support/community

Changed in mysql-8.0 (Ubuntu):
status: New → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for mysql-8.0 (Ubuntu) because there has been no activity for 60 days.]

Changed in mysql-8.0 (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.