Unable to uninstall mysql-server-5.6 properly, post-removal script fails

Bug #1436178 reported by Benjamin Xiao
42
This bug affects 10 people
Affects Status Importance Assigned to Milestone
mysql-5.6 (Ubuntu)
Fix Released
High
Unassigned

Bug Description

I tried to uninstall mysql-server-5.6, but the post-removal script failed with this message:

Removing mysql-server-5.6 (5.6.23-1~exp1~ubuntu4) ...
/usr/bin/deb-systemd-helper: error: unable to link /etc/systemd/system/mysql.service to /dev/null: File exists
dpkg: error processing package mysql-server-5.6 (--remove):
 subprocess installed post-removal script returned error exit status 1
Errors were encountered while processing:
 mysql-server-5.6
E: Sub-process /usr/bin/dpkg returned an error code (1)

This occurs on a fresh install of mysql, no databases, no extra configuration.

ProblemType: Bug
DistroRelease: Ubuntu 15.04
Package: mysql-server-5.6 5.6.23-1~exp1~ubuntu4
ProcVersionSignature: Ubuntu 3.19.0-10.10-generic 3.19.2
Uname: Linux 3.19.0-10-generic x86_64
NonfreeKernelModules: nvidia
ApportVersion: 2.16.2-0ubuntu4
Architecture: amd64
CurrentDesktop: Unity
Date: Tue Mar 24 22:56:09 2015
InstallationDate: Installed on 2015-01-20 (64 days ago)
InstallationMedia: Ubuntu 15.04 "Vivid Vervet" - Alpha amd64 (20150119)
SourcePackage: mysql-5.6
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Benjamin Xiao (ben-r-xiao) wrote :
Revision history for this message
rob982000 (rob982000) wrote :

I manged to re-install by first running:
sudo mv /etc/systemd/system/mysql.service ~/mysql.service.backup

then using apt-get to remove then install it again.

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
Benjamin Xiao (ben-r-xiao) wrote :

Yeah that workaround worked for me. Thanks!

Changed in mysql-5.6 (Ubuntu):
importance: Undecided → High
Robie Basak (racb)
Changed in mysql-5.6 (Ubuntu):
status: Confirmed → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (5.2 KiB)

This bug was fixed in the package mysql-5.6 - 5.6.23-1~exp1~ubuntu5

---------------
mysql-5.6 (5.6.23-1~exp1~ubuntu5) vivid; urgency=medium

  * Ubuntu upload from Debian VCS commit 804459b.

mysql-5.6 (5.6.23-1~exp1) UNRELEASED; urgency=medium

  [ Robie Basak ]
  * New upstream release.

  [ Norvald H. Ryeng ]
  * Remove unused build options.
  * Add libedit dependency to mysql-client-core-5.6.
  * Remove chmods not needed after fix for upstream bug #68517.
  * Lintian fixes.

  [ Bjoern Boschman ]
  * Removed hardening-wrapper from build-deps.
  * Added python dep for mysql-testsuite-5.6.
  * Added dpkg-dev dep.
  * Cleanup a bit more.

  [ Robie Basak ]
  * Add dep8 smoke test.
  * Re-enable libmysqld-pic, libmysqld-dev, libmysqlclient18 and
    libmysqlclient-dev (renamed accordingly) to replace binary packages
    provided by src:mysql-5.5.
  * Add mysql-server, mysql-client and mysql-testsuite to be switched
    over from src:mysql-5.5.
  * Import mysql-common from src:mysql-5.5 for 5.5 -> 5.6 switchover.
  * Cherry-pick relevant parts of Ubuntu delta from mysql-5.5:
    - d/mysql-server-5.5.postrm: restoring postrm debhelper token to get
      proper behaviors from dh_installinit and dh_apparmor.
    - Add Apport hook.

  [ James Page ]
  * d/tests/upstream: Add main.ctype_uca to skip-test list as it requires
    writable /usr.
  * d/p/fix-mysqlhotcopy-test-failure.patch: Add return code 255 to the
    list of allowed return codes.
  * d/tests/control: Re-enable upstream DEP-8 tests.

  [ Otto Kekäläinen ]
  * Added parallel build support via DEB_BUILD_OPTIONS

  [ Otto Kekäläinen ]
  * Remove makeflags from cmake command and output MAKEFLAGS for debugging
    purposes just before make is run

  [ Akhil Mohan ]
  * Provisioned dep8 test case upstream separated to run as non-root

  [ Norvald H. Ryeng ]
  * Simplify and stabilize tests
  * Remove USE_STATIC_MYSQLD
  * Add test plan to README.Maintainer
  * Add --force rationale to test plan

  [ Akhil Mohan ]
  * Make builds parallel Use MAKEFLAGS for parallel builds

  [ Otto Kekäläinen ]
  * Move mysql_plugin to server package as it controls the server plugins
  * Wrap-and-sort
  * Remove legacy 5.0->5.1 transition code that refers a internal-use-only
    -directory that does not even exist anymore.
  * Removed all unnecessary .dirs as most of the directories are generated
    automatically
  * Don't emit extra output at init invocation Many users have complained that
    they're database is corrupt because they tried to start the database and it
    refuses to do so, and at the same time emitting a message with the word
    "corrupt". this is just plain wrong and confusing, so I'm removing it.

  [ Akhil Mohan ]
  * added systemd service profile and script

  [ Norvald H. Ryeng ]
  * Remove special build options for taocrypt

  [ Robie Basak ]
  * Drop unused variable definition
  * Create /etc/mysql manually in debian/rules
  * Replace conf.d/.keepme with an empty directory

  [ Akhil Mohan ]
  * Standards version moved up to 3.9.6 in d/control
  * Added Systemd service profile and script

  [ Robie Basak ]
  * wrap-and-sort for systemd change
  * Drop unnecessary binary target
  ...

Read more...

Changed in mysql-5.6 (Ubuntu):
status: Fix Committed → Fix Released
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.