package mysql-server-5.7 (not installed) failed to install/upgrade: subprocess new pre-installation script returned error exit status 1

Bug #1672628 reported by Alan Muscat
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
mysql-5.7 (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Description: Ubuntu 16.04.2 LTS
Release: 16.04
pinba-engine-mysql-5.7:
  Installed: (none)
  Candidate: 1.1.0-1ubuntu1.5
  Version table:
     1.1.0-1ubuntu1.5 500
        500 http://archive.ubuntu.com/ubuntu xenial-updates/universe amd64 Packages
        500 http://archive.ubuntu.com/ubuntu xenial-security/universe amd64 Packages
     1.1.0-1ubuntu1 500
        500 http://archive.ubuntu.com/ubuntu xenial/universe amd64 Packages

The bug seems to be related to #1490071 however in my case I tried to install MySQL 5.7 after having installed MariaDB 10.1. Otherwise very similar.

Currently getting the following error when attempting apt-get upgrade:
The following packages have unmet dependencies.
 mysql-server : Depends: mysql-server-5.7 but it is not installed
E: Unmet dependencies. Try using -f.

Trying the suggested fix using: apt-get -f install
Results in the following error:
Preconfiguring packages ...
(Reading database ... 651596 files and directories currently installed.)
Preparing to unpack .../mysql-server-5.7_5.7.17-0ubuntu0.16.04.1_amd64.deb ...
Aborting downgrade from (at least) 10.1 to 5.7.
If are sure you want to downgrade to 5.7, remove the file
/var/lib/mysql/debian-*.flag and try installing again.
dpkg: error processing archive /var/cache/apt/archives/mysql-server-5.7_5.7.17-0ubuntu0.16.04.1_amd64.deb (--unpack):
 subprocess new pre-installation script returned error exit status 1
Errors were encountered while processing:
 /var/cache/apt/archives/mysql-server-5.7_5.7.17-0ubuntu0.16.04.1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Removing the suggested file /var/lib/mysql/debian-10.1.flag and running apt-get -f install once again results in the following:
Preconfiguring packages ...
(Reading database ... 651596 files and directories currently installed.)
Preparing to unpack .../mysql-server-5.7_5.7.17-0ubuntu0.16.04.1_amd64.deb ...
Unpacking mysql-server-5.7 (5.7.17-0ubuntu0.16.04.1) ...
Processing triggers for man-db (2.7.5-1) ...
Processing triggers for systemd (229-4ubuntu16) ...
Processing triggers for ureadahead (0.100.0-19) ...
ureadahead will be reprofiled on next reboot
Setting up mysql-server-5.7 (5.7.17-0ubuntu0.16.04.1) ...
Installing new version of config file /etc/apparmor.d/usr.sbin.mysqld ...
Installing new version of config file /etc/init.d/mysql ...
Installing new version of config file /etc/logrotate.d/mysql-server ...
Installing new version of config file /etc/mysql/debian-start ...
/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
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
No apport report written because the error message indicates it's a follow-up error from a previous failure.
                                                                                                            Processing triggers for systemd (229-4ubuntu16) ...
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)

Appreciate your kind attention in the matter.

ProblemType: Package
DistroRelease: Ubuntu 16.04
Package: mysql-server-5.7 (not installed)
ProcVersionSignature: Ubuntu 4.8.0-41.44~16.04.1-generic 4.8.17
Uname: Linux 4.8.0-41-generic x86_64
NonfreeKernelModules: nvidia_uvm nvidia_drm nvidia_modeset nvidia
ApportVersion: 2.20.1-0ubuntu2.5
Architecture: amd64
Date: Mon Mar 13 17:21:55 2017
ErrorMessage: subprocess new pre-installation script returned error exit status 1
InstallationDate: Installed on 2016-04-30 (317 days ago)
InstallationMedia: Ubuntu 16.04 LTS "Xenial Xerus" - Release amd64 (20160420.1)
RelatedPackageVersions:
 dpkg 1.18.4ubuntu1.1
 apt 1.2.19
SourcePackage: mysql-5.7
Title: package mysql-server-5.7 (not installed) failed to install/upgrade: subprocess new pre-installation script returned error exit status 1
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Alan Muscat (alan-p-muscat) 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
Joshua Powers (powersj) wrote :

From log:

If are sure you want to downgrade to 5.7, remove the file
/var/lib/mysql/debian-*.flag and try installing again.

Revision history for this message
Joshua Powers (powersj) wrote :

Hi!

You are correct this is pretty much identically to LP: #1490071. These both have to do with trying to downgrade after having a much newer version installed. I am going to dup this bug to that one unless you have concerns with me doing so. If so please put a comment below.

Thanks!

Revision history for this message
Alan Muscat (alan-p-muscat) wrote : Re: [Bug 1672628] Re: package mysql-server-5.7 (not installed) failed to install/upgrade: subprocess new pre-installation script returned error exit status 1
Download full text (6.2 KiB)

Hi Joshua,

I agree, it is a duplicate of #1490071.

Thanks and regards,

Alan.

On 27 March 2017 at 19:39, Joshua Powers <email address hidden> wrote:

> *** This bug is a duplicate of bug 1490071 ***
> https://bugs.launchpad.net/bugs/1490071
>
> Hi!
>
> You are correct this is pretty much identically to LP: #1490071. These
> both have to do with trying to downgrade after having a much newer
> version installed. I am going to dup this bug to that one unless you
> have concerns with me doing so. If so please put a comment below.
>
> Thanks!
>
> ** This bug has been marked a duplicate of bug 1490071
> MySQL 5.6 refuses to install on systems that have had MariaDB 10.0
> installed, preventing users from reverting to MySQL without manual
> intervention (aka mysql flag file system needs a redesign)
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1672628
>
> Title:
> package mysql-server-5.7 (not installed) failed to install/upgrade:
> subprocess new pre-installation script returned error exit status 1
>
> Status in mysql-5.7 package in Ubuntu:
> Confirmed
>
> Bug description:
> Description: Ubuntu 16.04.2 LTS
> Release: 16.04
> pinba-engine-mysql-5.7:
> Installed: (none)
> Candidate: 1.1.0-1ubuntu1.5
> Version table:
> 1.1.0-1ubuntu1.5 500
> 500 http://archive.ubuntu.com/ubuntu xenial-updates/universe
> amd64 Packages
> 500 http://archive.ubuntu.com/ubuntu xenial-security/universe
> amd64 Packages
> 1.1.0-1ubuntu1 500
> 500 http://archive.ubuntu.com/ubuntu xenial/universe amd64
> Packages
>
>
> The bug seems to be related to #1490071 however in my case I tried to
> install MySQL 5.7 after having installed MariaDB 10.1. Otherwise very
> similar.
>
> Currently getting the following error when attempting apt-get upgrade:
> The following packages have unmet dependencies.
> mysql-server : Depends: mysql-server-5.7 but it is not installed
> E: Unmet dependencies. Try using -f.
>
> Trying the suggested fix using: apt-get -f install
> Results in the following error:
> Preconfiguring packages ...
> (Reading database ... 651596 files and directories currently installed.)
> Preparing to unpack .../mysql-server-5.7_5.7.17-0ubuntu0.16.04.1_amd64.deb
> ...
> Aborting downgrade from (at least) 10.1 to 5.7.
> If are sure you want to downgrade to 5.7, remove the file
> /var/lib/mysql/debian-*.flag and try installing again.
> dpkg: error processing archive /var/cache/apt/archives/mysql-
> server-5.7_5.7.17-0ubuntu0.16.04.1_amd64.deb (--unpack):
> subprocess new pre-installation script returned error exit status 1
> Errors were encountered while processing:
> /var/cache/apt/archives/mysql-server-5.7_5.7.17-0ubuntu0.16.
> 04.1_amd64.deb
> E: Sub-process /usr/bin/dpkg returned an error code (1)
>
> Removing the suggested file /var/lib/mysql/debian-10.1.flag and running
> apt-get -f install once again results in the following:
> Preconfiguring packages ...
> (Reading database ... 651596 files and directories currently installed.)
> Preparing to unpack .../mysql-...

Read more...

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.