mysql server installation error

December 6, 2016 118 views
MySQL Ubuntu 16.04

I am trying to install mysql with this command -sudo apt-get install mysql-server
but this is resulting in this error.

update-rc.d: error: insserv rejected the script header
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 its a followup error from a previous failure.
Processing triggers for systemd (229-4ubuntu12) ...
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)

I have tried almost all solution like autoclean, autoremove, purge, update dist-update, removing source.list and again creating it. almost every thing..

Help me in installing mysql server.

1 Answer

Do you have any 3rd party apt repositories configured on your droplet? Generally the most common reason for this type of error is that your apt cache is out of date and you need to run an update. When this doesn't fix things it's possible that there is a conflict between the repositories you have enabled.

Have another answer? Share your knowledge.