mysql server installation error

Posted December 6, 2016 3.9k views
MySQLUbuntu 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:
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.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
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.