package mysql-server-5.7 5.7.17-0ubuntu0.16.04.1 failed to install/upgrade: subprocess installed post-installation script returned error exit status 1

Bug #1666784 reported by adpa shravan kumar
18
This bug affects 2 people
Affects Status Importance Assigned to Milestone
mysql-5.7 (Ubuntu)
Expired
High
Unassigned

Bug Description

im facing this problem

ProblemType: Package
DistroRelease: Ubuntu 16.04
Package: mysql-server-5.7 5.7.17-0ubuntu0.16.04.1
ProcVersionSignature: Ubuntu 4.4.0-62.83-generic 4.4.40
Uname: Linux 4.4.0-62-generic x86_64
ApportVersion: 2.20.1-0ubuntu2.5
Architecture: amd64
Date: Tue Feb 21 14:17:09 2017
DuplicateSignature:
 package:mysql-server-5.7:5.7.17-0ubuntu0.16.04.1
 Setting up mysql-server-5.7 (5.7.17-0ubuntu0.16.04.1) ...
 /var/lib/dpkg/info/mysql-server-5.7.postinst: line 143: /usr/share/mysql-common/configure-symlinks: No such file or directory
 dpkg: error processing package mysql-server-5.7 (--configure):
  subprocess installed post-installation script returned error exit status 1
ErrorMessage: subprocess installed post-installation script returned error exit status 1
InstallationDate: Installed on 2017-01-07 (45 days ago)
InstallationMedia: Ubuntu 16.04.1 LTS "Xenial Xerus" - Release amd64 (20160719)
Logs.var.log.daemon.log:

MySQLConf.etc.mysql.conf.d.mysql.cnf: [mysql]
MySQLConf.etc.mysql.conf.d.mysqldump.cnf:
 [mysqldump]
 quick
 quote-names
 max_allowed_packet = 16M
MySQLConf.etc.mysql.mysql.conf.d.mysqld_safe_syslog.cnf:
 [mysqld_safe]
 syslog
MySQLVarLibDirListing: ['ib_logfile1', 'ibtmp1', 'ib_logfile0', 'ibdata1', 'sys', 'zabbix', 'debian-5.7.flag', 'ib_buffer_pool', 'mysql', 'auto.cnf', 'performance_schema']
ProcCmdline: BOOT_IMAGE=/vmlinuz-4.4.0-62-generic root=UUID=53cccb93-f063-48ed-8828-22f94dec8f57 ro quiet splash vt.handoff=7
RelatedPackageVersions:
 dpkg 1.18.4ubuntu1.1
 apt 1.2.19
SourcePackage: mysql-5.7
Title: package mysql-server-5.7 5.7.17-0ubuntu0.16.04.1 failed to install/upgrade: subprocess installed post-installation script returned error exit status 1
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
adpa shravan kumar (shravanu) wrote :
tags: removed: need-duplicate-check
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in mysql-5.7 (Ubuntu):
status: New → Confirmed
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Hi,
thank you for your report and your help to make Ubuntu better.

mysql-server-5.7 pre depends on mysql-common
  Pre-Depends: adduser (>= 3.40), debconf, mysql-common (>= 5.5)

And mysql-common is what holds that file
  $ dpkg -S /usr/share/mysql-common/configure-symlinks
  mysql-common: /usr/share/mysql-common/configure-symlinks

I wonder how that could happen for you, are you by accident installing the .deb - no I see in the bits of apt history that are included you are using apt.

When I try to reproduce I see it correctly pulling in mysql-common:
The following NEW packages will be installed:
  libaio1 libcgi-fast-perl libcgi-pm-perl libencode-locale-perl libevent-core-2.0-5 libfcgi-perl
  libhtml-parser-perl libhtml-tagset-perl libhtml-template-perl libhttp-date-perl libhttp-message-perl
  libio-html-perl liblwp-mediatypes-perl libtimedate-perl liburi-perl mysql-client-5.7 mysql-client-core-5.7
  mysql-common mysql-server mysql-server-5.7 mysql-server-core-5.7

But your Logs hold it without mysql-common which is causing the issue:
Start-Date: 2017-02-21 14:16:23
Commandline: apt-get install mysql-server
Install: mysql-client-5.7:amd64 (5.7.17-0ubuntu0.16.04.1, automatic), mysql-server-5.7:amd64 (5.7.17-0ubuntu0.16.04.1, automatic), mysql-server:amd64 (5.7.17-0ubuntu0.16.04.1), mysql-client-core-5.7:amd64 (5.7.17-0ubuntu0.16.04.1, automatic), mysql-server-core-5.7:amd64 (5.7.17-0ubuntu0.16.04.1, automatic)
Remove: mariadb-server-core-10.0:amd64 (10.0.29-0ubuntu0.16.04.1), mariadb-client-10.0:amd64 (10.0.29-0ubuntu0.16.04.1), mariadb-client-core-10.0:amd64 (10.0.29-0ubuntu0.16.04.1), mariadb-client:amd64 (10.0.29-0ubuntu0.16.04.1)

I see in your case it uninstalls a bunch of mariadb dependencies (as it is an either/or case).
Maybe that is causing the issue.

... installying mariadb and mysql from there ...

mysql-common is installed due to mariadb as well and just happens to be there already later on.

From this my case looks like:
The following packages will be REMOVED:
  mariadb-client-10.0 mariadb-client-core-10.0 mariadb-server mariadb-server-10.0 mariadb-server-core-10.0
The following NEW packages will be installed:
  libevent-core-2.0-5 mysql-client-5.7 mysql-client-core-5.7 mysql-server mysql-server-5.7
  mysql-server-core-5.7

Hmm,
could you share what the following commands provide in your case?
dpkg -l mysql-common
dpkg -S /usr/share/mysql-common/configure-symlinks

As I said it should be installed via dependencies, but maybe try
$ apt-get install mysql-common
$ apt-get install mysql-server

Changed in mysql-5.7 (Ubuntu):
importance: Undecided → High
Nish Aravamudan (nacc)
Changed in mysql-5.7 (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Daniel Black (daniel-black) wrote :

seems as though zabbix-server-mysql is pulling in mysql-server-5.7 even though mariadb-server was installed a few days earlier. Surely it can work with both?

There also doesn't seem to be a mysql-common installed before mysql-server-core was installed.

Setting up mysql-server-core-5.7 (5.7.17-0ubuntu0.16.04.1) ...
Setting up mysql-server-5.7 (5.7.17-0ubuntu0.16.04.1) ...
/var/lib/dpkg/info/mysql-server-5.7.postinst: line 143: /usr/share/mysql-common/configure-symlinks: No such file or directory
dpkg: error processing package mysql-server-5.7 (--configure):
 subprocess installed post-installation script returned error exit status 1

Revision history for this message
Launchpad Janitor (janitor) wrote :

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

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

Duplicates of this bug

Other bug subscribers

Remote bug watches

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