package mysql-server-5.7 5.7.22-0ubuntu0.16.04.1 failed to install/upgrade: subprocess installed post-installation script returned error exit status 1
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
mysql-5.7 (Ubuntu) |
Expired
|
Undecided
|
Unassigned |
Bug Description
Upgrading Ubuntu ran into this
ProblemType: Package
DistroRelease: Ubuntu 16.04
Package: mysql-server-5.7 5.7.22-
ProcVersionSign
Uname: Linux 3.13.0-79-generic x86_64
ApportVersion: 2.20.1-0ubuntu2.18
Architecture: amd64
Date: Mon Jul 23 14:22:10 2018
ErrorMessage: subprocess installed post-installation script returned error exit status 1
InstallationDate: Installed on 2014-04-18 (1557 days ago)
InstallationMedia:
Logs.var.
MySQLConf.
MySQLConf.
[mysqld_safe]
syslog
MySQLConf.
[mysqldump]
quick
quote-names
max_allowed_packet = 16M
MySQLConf.
[mysqld_safe]
syslog
MySQLVarLibDirL
ProcCmdline: root=LABEL=DOROOT ro
RelatedPackageV
dpkg 1.18.4ubuntu1.4
apt 1.2.27
SourcePackage: mysql-5.7
Title: package mysql-server-5.7 5.7.22-
UpgradeStatus: Upgraded to xenial on 2018-07-23 (0 days ago)
tags: | removed: need-duplicate-check |
Thanks for filing this bug in Ubuntu.
I just tried an Ubuntu release upgrade from Trusty to Xenial with mysql 5.5 installed and configured, and it finished without issues. I even selected that option to not restart services automatically, thinking that would mess up the upgrade, but it still worked.
This is the bit that failed, from your logs: d/mysql- server ... debian- start ... B^[[B^[ [B^[[B^ [[B^[[B^ [[B^[[B^ [[B^[[B^ [[B^[[B^ [[B^[[B^ [[B^[[B^ [[B^[[B^ [[B^[[B^ [[B^[[B^ [[B^[[B^ [[B^[[B^ [[B^[[B^ [[B^[[B^ [[B^[[B 0ubuntu0. 14.04.1) does not match with the version of version- check to skip this check.
...
Installing new version of config file /etc/logrotate.
Installing new version of config file /etc/mysql/
^[[B^[[
Renaming removed key_buffer and myisam-recover options (if present)
start: Job is already running: mysql
invoke-rc.d: initscript mysql, action "start" failed.
invoke-rc.d: release upgrade in progress, error is not fatal
Checking if update is needed.
Checking server version.
Error: Server version (5.5.53-
the server (5.7.22) with which this program was built/distributed. You can
use --skip-
mysql_upgrade failed with exit status 3
dpkg: error processing package mysql-server-5.7 (--configure):
subprocess installed post-installation script returned error exit status 1
It looks like maybe mysql didn't stop, and then the subsequent start failed.
There is also this bit in the mysql logs that looks worrisome, as it's about some damaged tables you have in your DB: 0ubuntu0. 14.04.1' socket: '/var/run/ mysqld/ mysqld. sock' port: 3306 (Ubuntu) freepbx_ settings' is marked as crashed and should be repaired freepbx_ settings' notifications' is marked as crashed and should be repaired notifications' module_ xml' is marked as crashed and should be repaired module_ xml' kvstore' is marked as crashed and should be repaired kvstore' b/cdr' is marked as crashed and should be repaired b/cdr'
Version: '5.5.53-
180723 11:46:14 [ERROR] /usr/sbin/mysqld: Table './asterisk/
180723 11:46:14 [Warning] Checking table: './asterisk/
180723 11:46:14 [ERROR] /usr/sbin/mysqld: Table './asterisk/
180723 11:46:14 [Warning] Checking table: './asterisk/
180723 11:46:14 [ERROR] /usr/sbin/mysqld: Table './asterisk/
180723 11:46:14 [Warning] Checking table: './asterisk/
180723 11:46:14 [ERROR] /usr/sbin/mysqld: Table './asterisk/
180723 11:46:14 [Warning] Checking table: './asterisk/
180723 11:48:52 [ERROR] /usr/sbin/mysqld: Table './asteriskcdrd
180723 11:48:52 [Warning] Checking table: './asteriskcdrd
180723 12:10:01 [ERROR] /usr/sbin/mysqld: Table './asterisk/admin' is marked as crashed and should be repaired
180723 12:10:01 [Warning] Checking table: './asterisk/admin'
Bottom line, in orther to further troubleshoot this, we will need a way to reproduce the problem. Some simple steps that would show the upgrade failing like in your case. Until then, I'll mark this bug as incomplete.
As for the system as it stands now, I would try:
sudo apt update
sudo apt -f install <--- inspect that output carefully, see what it wants to do
And *maybe* sudo apt dist-upgrade to let it complete the release upgrade, if it was interrupted.