postinst fails: configure-symlinks missing even though mysql-common appears installed

Bug #1771630 reported by Houmed AHMED
104
This bug affects 32 people
Affects Status Importance Assigned to Milestone
mysql-5.7 (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

n/a

ProblemType: Package
DistroRelease: Ubuntu 18.04
Package: mysql-server-5.7 (not installed)
ProcVersionSignature: Ubuntu 4.15.0-20.21-generic 4.15.17
Uname: Linux 4.15.0-20-generic x86_64
ApportVersion: 2.20.9-0ubuntu7
Architecture: amd64
Date: Wed May 9 01:14:31 2018
DuplicateSignature:
 package:mysql-server-5.7:(not installed)
 Setting up mysql-server-5.7 (5.7.22-0ubuntu18.04.1) ...
 /var/lib/dpkg/info/mysql-server-5.7.postinst: line 191: /usr/share/mysql-common/configure-symlinks: No such file or directory
 dpkg: error processing package mysql-server-5.7 (--configure):
  installed mysql-server-5.7 package post-installation script subprocess returned error exit status 127
ErrorMessage: installed mysql-server-5.7 package post-installation script subprocess returned error exit status 127
InstallationDate: Installed on 2018-05-07 (9 days ago)
InstallationMedia: Ubuntu 18.04 LTS "Bionic Beaver" - Release amd64 (20180426)
Python3Details: /usr/bin/python3.6, Python 3.6.5, python3-minimal, 3.6.5-3
PythonDetails: /usr/bin/python2.7, Python 2.7.15rc1, python-minimal, 2.7.15~rc1-1
RelatedPackageVersions:
 dpkg 1.19.0.5ubuntu2
 apt 1.6.1
SourcePackage: mysql-5.7
Title: package mysql-server-5.7 (not installed) failed to install/upgrade: installed mysql-server-5.7 package post-installation script subprocess returned error exit status 127
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Houmed AHMED (ai7ch) wrote :
tags: removed: need-duplicate-check
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Thanks for filing this bug in Ubuntu.

The error you got is unusual:
/var/lib/dpkg/info/mysql-server-5.7.postinst: line 191: /usr/share/mysql-common/configure-symlinks: No such file or directory

I suggest the following steps:

sudo apt update
sudo apt -f install

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

I've just dup'ed another bug onto this.
But I can't see yet how this would happen.

The file is of mysql-common:
$ dpkg -S /usr/share/mysql-common/configure-symlinks
mysql-common: /usr/share/mysql-common/configure-symlinks

And this is a dependency.
Depends: apparmor (>= 2.10), bsdutils, initscripts, lsb-base (>= 4.1+Debian11ubuntu7), mysql-client-5.7 (>= 5.7.17-0ubuntu0.16.04.1), mysql-common (>= 5.6.22-1~), mysql-server-core-5.7 (= 5.7.17-0ubuntu0.16.04.1), passwd, perl (>= 5.6), psmisc, debconf (>= 0.5) | debconf-2.0, init-system-helpers (>= 1.18~), libc6 (>= 2.14), libevent-core-2.0-5 (>= 2.0.10-stable), libgcc1 (>= 1:3.0), libstdc++6 (>= 5.2), zlib1g (>= 1:1.1.4)
Pre-Depends: adduser (>= 3.40), debconf, mysql-common (>= 5.5)

I thought that (unless you go through extra steps) they would be unpacked in dependency order and then should be available at the time needed - odd ...

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

I've only found two ways to reproduce to far
1. remove the file maliciously
  $ mv /usr/share/mysql-common/configure-symlinks /usr/share/mysql-common/configure-symlinks.nomore
  $ apt install --reinstall mysql-server-5.7
2. dpkg --ignore-depends=mysql-common -i mysql-server-5.7_5.7.22-0ubuntu18.04.1_amd64.deb

I think we can agree that neither is meant to work, so I still wonder how it happens in the real world to the bug reporters.

Revision history for this message
Robie Basak (racb) wrote :

According to the logs you have mysql-common 10.1.32+maria-1~xenial installed. This version is from an external source: it has never shipped with Ubuntu. The subsequent maintainer script failure is a consequence of this.

As this isn't caused by any bug in Ubuntu itself, I'm marking this bug as Invalid.

You can find pointers to get help for this sort of problem here: http://www.ubuntu.com/support/community

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

FYI: https://askubuntu.com/questions/980314/cannot-install-mysql-server-in-ubuntu16-0-4

Also ending up mostly with:
- related to mariadb/mysql conflicts
- showing some manual workarounds

In general anyone affected usually can check the package availability and integrity like:
$ dpkg -S /usr/share/mysql-common/configure-symlinks
mysql-common: /usr/share/mysql-common/configure-symlinks
$ dpkg --verify mysql-common
<should have no output>
$ apt-cache policy mysql-common
mysql-common:
  Installed: 5.8+1.0.4
  Candidate: 5.8+1.0.4
  Version table:
 *** 5.8+1.0.4 500
        500 http://de.archive.ubuntu.com/ubuntu bionic/main amd64 Packages
        500 http://de.archive.ubuntu.com/ubuntu bionic/main i386 Packages
        100 /var/lib/dpkg/status

You should be up to date and this should be installed as dependency of mysql.
If - as in some cases reported here - you have external mariadb sources that might provide a newer and incompatible version of mysql-common and thereby break you.

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

I've just marked another bug report a dup.
For the sake of collecting all different-but-same causes in one place I wanted to quote the issue.
In the new case it is - again - a mysql from a 3rd party that is interfering with what is provided by Ubuntu.

In this case due to leftovers of mysql-community-* packages from https://dev.mysql.com/downloads/mysql/

summary: - package mysql-server-5.7 (not installed) failed to install/upgrade:
- installed mysql-server-5.7 package post-installation script subprocess
- returned error exit status 127
+ postinst fails: configure-symlinks missing even though mysql-common
+ appears installed
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.