It is unclear (because of the following) if the issue is actually in mysql-server or nagios:
Setting up mysql-server-5.7 (5.7.18-0ubuntu0.16.04.1) ... insserv: warning: current start runlevel(s) (empty) of script `mysql' overrides LSB defaults (2 3 4 5). insserv: warning: current stop runlevel(s) (0 1 2 3 4 5 6) of script `mysql' overrides LSB defaults (0 1 6). insserv: Script nagios is broken: incomplete LSB comment. insserv: missing `Default-Start:' entry: please add even if empty. insserv: missing `Default-Stop:' entry: please add even if empty. insserv: Default-Start undefined, assuming empty start runlevel(s) for script `nagios' insserv: Default-Stop undefined, assuming empty stop runlevel(s) for script `nagios' dpkg: error processing package mysql-server-5.7 (--configure): subprocess installed post-installation script returned error exit status 1 The two warnings are non-fatal, as far as I know. Can you remove nagios (for now) and see if MySQL successfully installs? ** Changed in: mysql-5.7 (Ubuntu) Status: Confirmed => Incomplete -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1688012 Title: package mysql-server-5.7 5.7.18-0ubuntu0.16.04.1 failed to install/upgrade: subprocess installed post-installation script returned error exit status 1 To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/mysql-5.7/+bug/1688012/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs