[SRU] mysql-server-5.6.postrm fails when /usr/share/mysql-common/configure-symlinks doesn't exist

Bug #1455818 reported by Daniel
40
This bug affects 5 people
Affects Status Importance Assigned to Milestone
mysql-5.6 (Ubuntu)
High
Robie Basak
Vivid
Low
Unassigned
Wily
High
Unassigned
mysql-5.7 (Ubuntu)
Medium
Aldo
Vivid
Undecided
Aldo
Wily
Undecided
Aldo
Xenial
Medium
Unassigned

Bug Description

It's impossible to install, upgrade, or even remove mysql 5.6 from my system. At this point, also blocking other package removals.

apt-get install -f won't repair this broken package either.

ProblemType: Package
DistroRelease: Ubuntu 15.04
Package: mysql-server-5.6 5.6.24-0ubuntu2
ProcVersionSignature: Ubuntu 3.19.0-17.17-generic 3.19.6
Uname: Linux 3.19.0-17-generic x86_64
NonfreeKernelModules: nvidia wl
ApportVersion: 2.17.2-0ubuntu1
AptOrdering:
 mysql-server-5.6: Remove
 NULL: ConfigurePending
Architecture: amd64
Date: Sat May 16 18:22:19 2015
DpkgTerminalLog:
 Removing mysql-server-5.6 (5.6.24-0ubuntu2) ...
 /var/lib/dpkg/info/mysql-server-5.6.postrm: line 53: /usr/share/mysql-common/configure-symlinks: No such file or directory
 dpkg: error processing package mysql-server-5.6 (--remove):
  subprocess installed post-removal script returned error exit status 1
DuplicateSignature: package:mysql-server-5.6:5.6.24-0ubuntu2:subprocess installed post-removal script returned error exit status 1
ErrorMessage: subprocess installed post-removal script returned error exit status 1
InstallationDate: Installed on 2014-01-27 (474 days ago)
InstallationMedia: Xubuntu 13.10 "Saucy Salamander" - Release amd64 (20131016)
RelatedPackageVersions:
 dpkg 1.17.25ubuntu1
 apt 1.0.9.7ubuntu4
SourcePackage: mysql-5.6
Title: package mysql-server-5.6 5.6.24-0ubuntu2 failed to install/upgrade: subprocess installed post-removal script returned error exit status 1
UpgradeStatus: No upgrade log present (probably fresh install)
mtime.conffile..etc.apparmor.d.usr.sbin.mysqld: 2015-03-25T14:49:33
mtime.conffile..etc.init.d.mysql: 2015-03-25T14:28:21

Revision history for this message
Daniel (cdtenzi) 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.6 (Ubuntu):
status: New → Confirmed
Revision history for this message
Robie Basak (racb) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better.

Please could you try:

sudo apt-get install mysql-common
sudo dpkg -P mysql-server-5.6
sudo dpkg -P mysql-common

If this works, then I need to fix mysql-server-5.6.postrm to test for the configure-symlinks wrapper before calling it.

Robie Basak (racb)
summary: - package mysql-server-5.6 5.6.24-0ubuntu2 failed to install/upgrade:
- subprocess installed post-removal script returned error exit status 1
+ mysql-server-5.6.postrm fails when /usr/share/mysql-common/configure-
+ symlinks doesn't exist
Changed in mysql-5.6 (Ubuntu):
importance: Undecided → High
Revision history for this message
Daniel (cdtenzi) wrote : Re: mysql-server-5.6.postrm fails when /usr/share/mysql-common/configure-symlinks doesn't exist

Hi Robie, i just tried what you said and no lick at all, please see below:

daniel@DT-ENVY:~$ sudo apt-get install mysql-common
Leyendo lista de paquetes... Hecho
Creando árbol de dependencias
Leyendo la información de estado... Hecho
mysql-common ya está en su versión más reciente.
Los paquetes indicados a continuación se instalaron de forma automática y ya no son necesarios.
  libdbd-mysql-perl libdbi-perl libterm-readkey-perl mysql-client-5.6
  mysql-client-core-5.6 mysql-server-core-5.6
Utilice «apt-get autoremove» para eliminarlos.
Los siguientes paquetes se ELIMINARÁN:
  mysql-server-5.6
0 actualizados, 0 nuevos se instalarán, 1 para eliminar y 16 no actualizados.
1 no instalados del todo o eliminados.
Se liberarán 52,5 MB después de esta operación.
¿Desea continuar? [S/n] s
(Leyendo la base de datos ... 437843 ficheros o directorios instalados actualmente.)
Desinstalando mysql-server-5.6 (5.6.24-0ubuntu2) ...
/var/lib/dpkg/info/mysql-server-5.6.postrm: línea 53: /usr/share/mysql-common/configure-symlinks: No existe el archivo o el directorio
dpkg: error al procesar el paquete mysql-server-5.6 (--remove):
 el subproceso instalado el script post-removal devolvió el código de salida de error 1
Se encontraron errores al procesar:
 mysql-server-5.6
E: Sub-process /usr/bin/dpkg returned an error code (1)
daniel@DT-ENVY:~$

The follwing:
sudo dpkg -P mysql-server-5.6
sudo dpkg -P mysql-common

Also fail.

Revision history for this message
Daniel (cdtenzi) wrote :

trace for
sudo dpkg -P mysql-server-5.6

daniel@DT-ENVY:~$ sudo dpkg -P mysql-server-5.6
(Leyendo la base de datos ... 437843 ficheros o directorios instalados actualmente.)
Desinstalando mysql-server-5.6 (5.6.24-0ubuntu2) ...
/var/lib/dpkg/info/mysql-server-5.6.postrm: línea 53: /usr/share/mysql-common/configure-symlinks: No existe el archivo o el directorio
dpkg: error al procesar el paquete mysql-server-5.6 (--purge):
 el subproceso instalado el script post-removal devolvió el código de salida de error 1
Se encontraron errores al procesar:
 mysql-server-5.6

Revision history for this message
jfcjfc (jfcjfc) wrote :

impossible to install, upgrade, or even remove mysql 5.6 from my system

TRACE :
jfc@JFCMS:~$ sudo dpkg -P mysql-server-5.6
(Lecture de la base de données... 402863 fichiers et répertoires déjà installés.)
Suppression de mysql-server-5.6 (5.6.24-0ubuntu2) ...
/var/lib/dpkg/info/mysql-server-5.6.postrm: ligne 53: /usr/share/mysql-common/configure-symlinks: Aucun fichier ou dossier de ce type
dpkg: erreur de traitement du paquet mysql-server-5.6 (--purge) :
 le sous-processus script post-removal installé a retourné une erreur de sortie d'état 1
Des erreurs ont été rencontrées pendant l'exécution :
 mysql-server-5.6
jfc@JFCMS:~$ sudo apt-get remove --purge mysql-server-5.6
Lecture des listes de paquets... Fait
Construction de l'arbre des dépendances
Lecture des informations d'état... Fait
Le paquet suivant a été installé automatiquement et n'est plus nécessaire :
  mysql-server-core-5.6
Veuillez utiliser « apt-get autoremove » pour le supprimer.
Les paquets suivants seront ENLEVÉS :
  mysql-server-5.6
0 mis à jour, 0 nouvellement installés, 1 à enlever et 7 non mis à jour.
1 partiellement installés ou enlevés.
Après cette opération, 50,8 Mo d'espace disque seront libérés.
Souhaitez-vous continuer ? [O/n]
(Lecture de la base de données... 402863 fichiers et répertoires déjà installés.)
Suppression de mysql-server-5.6 (5.6.24-0ubuntu2) ...
/var/lib/dpkg/info/mysql-server-5.6.postrm: ligne 53: /usr/share/mysql-common/configure-symlinks: Aucun fichier ou dossier de ce type
dpkg: erreur de traitement du paquet mysql-server-5.6 (--remove) :
 le sous-processus script post-removal installé a retourné une erreur de sortie d'état 1
Des erreurs ont été rencontrées pendant l'exécution :
 mysql-server-5.6
E: Sub-process /usr/bin/dpkg returned an error code (1)
jfc@JFCMS:~$

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

Workaround: edit /var/lib/dpkg/info/mysql-server-5.6.postrm. Comment out lines that mention configure-symlinks. Retry.

Revision history for this message
Daniel (cdtenzi) wrote :

Thanks Robie, works like a charm! :)

Revision history for this message
Daniel (cdtenzi) wrote :

Guys, I found a way to install Mysql Server 5.6:

Select all mysql server packages on synaptic for install and proceed with the install.

It will fail to configure Mysql-Server-5.6, so then you have to do the following:

Open post installation script on /var/lib/dpkg/info/mysql-server-5.6.postinst and comment out line 95:
### /usr/share/mysql-common/configure-symlinks install mysql "$mysql_cfgdir/mysql.cnf"

then run:
 sudo apt-get install mysql-common

that's it.

Robie Basak (racb)
tags: added: mysql-5.6-transition
Robie Basak (racb)
Changed in mysql-5.6 (Ubuntu):
status: Confirmed → In Progress
assignee: nobody → Robie Basak (racb)
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package mysql-5.6 - 5.6.27-2

---------------
mysql-5.6 (5.6.27-2) unstable; urgency=medium

  * Fix dep8 test failure by bumping back "future" date. Taken from
    Ubuntu. Thanks to Marc Deslauriers.
  * Update debian/watch.
  * d/copyright: wildcard mysql.5.6.*.spec.
  * Bump debhelper Build-Depends to >= 9.
  * Drop no longer used lintian override maintainer-script-lacks-
    debhelper-token.
  * d/mysql-server-5.6.postrm:
    - Drop duplicate section.
    - Only run configure-symlinks if it exists (LP: #1455818).

 -- Robie Basak <email address hidden> Wed, 11 Nov 2015 12:08:33 +0000

Changed in mysql-5.6 (Ubuntu):
status: In Progress → Fix Released
Revision history for this message
Robie Basak (racb) wrote :

If anyone is affected by this on Vivid or Wily, please let me know and I can bump the priority. Right now I believe there have been no reports since this was fixed in Xenial so I am not prioritising it.

Changed in mysql-5.6 (Ubuntu Vivid):
status: New → Triaged
Changed in mysql-5.6 (Ubuntu Wily):
status: New → Triaged
Changed in mysql-5.6 (Ubuntu Vivid):
importance: Undecided → Low
Changed in mysql-5.6 (Ubuntu Wily):
importance: Undecided → Low
Robie Basak (racb)
tags: added: bitesize
Revision history for this message
Jelle De Loecker (skerit) wrote :

I just ran into this issue on my new install of Ubuntu Server 15.10.

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

Thank you for the report! We'll update 15.10 then.

Changed in mysql-5.6 (Ubuntu Wily):
importance: Low → High
tags: added: server-next
Nish Aravamudan (nacc)
summary: - mysql-server-5.6.postrm fails when /usr/share/mysql-common/configure-
- symlinks doesn't exist
+ [SRU] mysql-server-5.6.postrm fails when /usr/share/mysql-
+ common/configure-symlinks doesn't exist
Revision history for this message
Jelle De Loecker (skerit) wrote :

I just had the same issue after an upgrade to 16.04, running mysql 5.7. How is that possible?

Revision history for this message
Jelle De Loecker (skerit) wrote :

$ sudo apt install mysql-server
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
  mysql-server-5.7
Suggested packages:
  mailx tinyca
The following NEW packages will be installed:
  mysql-server mysql-server-5.7
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 2,597 kB of archives.
After this operation, 48.5 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://archive.ubuntu.com/ubuntu xenial-proposed/main amd64 mysql-server-5.7 amd64 5.7.12-0ubuntu1.1 [2,587 kB]
Get:2 http://archive.ubuntu.com/ubuntu xenial-proposed/main amd64 mysql-server all 5.7.12-0ubuntu1.1 [10.1 kB]
Fetched 2,597 kB in 1s (1,523 kB/s)
Preconfiguring packages ...
Selecting previously unselected package mysql-server-5.7.
(Reading database ... 151364 files and directories currently installed.)
Preparing to unpack .../mysql-server-5.7_5.7.12-0ubuntu1.1_amd64.deb ...
Unpacking mysql-server-5.7 (5.7.12-0ubuntu1.1) ...
Selecting previously unselected package mysql-server.
Preparing to unpack .../mysql-server_5.7.12-0ubuntu1.1_all.deb ...
Unpacking mysql-server (5.7.12-0ubuntu1.1) ...
Processing triggers for systemd (229-4ubuntu6) ...
Processing triggers for ureadahead (0.100.0-19) ...
Processing triggers for man-db (2.7.5-1) ...
Setting up mysql-server-5.7 (5.7.12-0ubuntu1.1) ...
/var/lib/dpkg/info/mysql-server-5.7.postinst: line 112: /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
dpkg: dependency problems prevent configuration of mysql-server:
 mysql-server depends on mysql-server-5.7; however:
  Package mysql-server-5.7 is not configured yet.

dpkg: error processing package mysql-server (--configure):
 dependency problems - leaving unconfigured
Processing triggers for systemd (229-4ubuntu6) ...
Processing triggers for ureadahead (0.100.0-19) ...
Errors were encountered while processing:
 mysql-server-5.7
 mysql-server
E: Sub-process /usr/bin/dpkg returned an error code (1)

Revision history for this message
Oscar (oscar-delarosa) wrote :

There is the same problem with version 5.7 of mysql server.

Changed in mysql-5.7 (Ubuntu):
status: New → Incomplete
status: Incomplete → New
Revision history for this message
Oscar (oscar-delarosa) wrote :

jmq@pandora:/var/lib$ sudo apt install mysql-server
Leyendo lista de paquetes... Hecho
Creando árbol de dependencias
Leyendo la información de estado... Hecho
Se instalarán los siguientes paquetes NUEVOS:
  mysql-server
0 actualizados, 1 nuevos se instalarán, 0 para eliminar y 0 no actualizados.
1 no instalados del todo o eliminados.
Se necesita descargar 0 B/10.1 kB de archivos.
Se utilizarán 159 kB de espacio de disco adicional después de esta operación.
Seleccionando el paquete mysql-server previamente no seleccionado.
(Leyendo la base de datos ... 619765 ficheros o directorios instalados actualmente.)
Preparando para desempaquetar .../mysql-server_5.7.12-0ubuntu1.1_all.deb ...
Desempaquetando mysql-server (5.7.12-0ubuntu1.1) ...
Configurando mysql-server-5.7 (5.7.12-0ubuntu1.1) ...
/var/lib/dpkg/info/mysql-server-5.7.postinst: línea 112: /usr/share/mysql-common/configure-symlinks: No existe el archivo o el directorio
dpkg: error al procesar el paquete mysql-server-5.7 (--configure):
 el subproceso instalado el script post-installation devolvió el código de salida de error 1
dpkg: problemas de dependencias impiden la configuración de mysql-server:
 mysql-server depende de mysql-server-5.7; sin embargo:
 El paquete `mysql-server-5.7' no está configurado todavía.

dpkg: error al procesar el paquete mysql-server (--configure):
 problemas de dependencias - se deja sin configurar
No se escribió un informe «apport» porque el mensaje de error indica que es un mensaje de error asociado a un fallo previo.
                                                                                                                           Se encontraron errores al procesar:
 mysql-server-5.7
 mysql-server
E: Sub-process /usr/bin/dpkg returned an error code (1)
jmq@pandora:/var/lib$

Nish Aravamudan (nacc)
Changed in mysql-5.6 (Ubuntu Vivid):
status: Triaged → Won't Fix
Changed in mysql-5.6 (Ubuntu Wily):
status: Triaged → Won't Fix
no longer affects: mysql-5.6 (Ubuntu Xenial)
Changed in mysql-5.7 (Ubuntu Vivid):
status: New → Won't Fix
Changed in mysql-5.7 (Ubuntu Wily):
status: New → Won't Fix
Revision history for this message
ktecho (ktecho) wrote :

My update from Ubuntu 16.04 (mysql 5.7 current) to 16.10 has failed because of this too:

Configurando mysql-server-5.7 (5.7.15-0ubuntu2) ...
/var/lib/dpkg/info/mysql-server-5.7.postinst: line 143: /usr/share/mysql-common/configure-symlinks: No such file or directory
dpkg: error al procesar el paquete mysql-server-5.7 (--configure):
 el subproceso instalado el script post-installation devolvió el código de salida de error 1
dpkg: problemas de dependencias impiden la configuración de mysql-server:
 mysql-server depende de mysql-server-5.7; sin embargo:
 El paquete `mysql-server-5.7' no está configurado todavía.

dpkg: error al procesar el paquete mysql-server (--configure):
 problemas de dependencias - se deja sin configurar
Se encontraron errores al procesar:
 mysql-server-5.7
 mysql-server
E: Sub-process /usr/bin/dpkg returned an error code (1)

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 Xenial):
status: New → Confirmed
Changed in mysql-5.7 (Ubuntu):
status: New → Confirmed
Robie Basak (racb)
Changed in mysql-5.7 (Ubuntu):
importance: Undecided → Medium
Changed in mysql-5.7 (Ubuntu Xenial):
importance: Undecided → Medium
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Yakkety now has mysql 5.7.18-0ubuntu0.16.10.1 in yakkety-updates. I tried a quick release-upgrade from up-to-date xenial which has 5.7.18-0ubuntu0.16.04.1 and it worked, no package installation errors.

Changed in mysql-5.7 (Ubuntu):
status: Confirmed → Incomplete
Changed in mysql-5.7 (Ubuntu Xenial):
status: Confirmed → Incomplete
Revision history for this message
Robie Basak (racb) wrote :

Thank you for testing Andreas! I'm going to go one step further and set this bug to Invalid for mysql-5.7 entirely.

The reason is that I found and fixed the root cause in mysql-5.6, and mysql-5.7 has never been affected by that same root cause. Since we track one root cause per bug, therefore I know that mysql-5.7 has never been affected by this particular root cause and thus this bug.

For users experiencing a similar issue in mysql-5.7, please file a new bug with full details, as if there is a bug it will be a different root cause that we will need to investigate and debug separately. Using this bug will just conflate the separate issues. If you do file a new bug, feel free to link to that bug from here so that users can find their way around. Thanks!

Changed in mysql-5.7 (Ubuntu):
status: Incomplete → Invalid
Changed in mysql-5.7 (Ubuntu Xenial):
status: Incomplete → Invalid
Aldo (aldocr07)
Changed in mysql-5.7 (Ubuntu):
assignee: nobody → Aldo (aldocr07)
Changed in mysql-5.7 (Ubuntu Wily):
assignee: nobody → Aldo (aldocr07)
Changed in mysql-5.7 (Ubuntu Vivid):
assignee: nobody → Aldo (aldocr07)
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

I've seen enough hits on this in 5.7 now to be concerened.
FYI - it seems that bug 1771630 might become this bug for mysql 5.7 - at least it is the one I duped the other bugs to.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers