loading...

Mysql installation error on WSL 1

femilawal profile image Oluwafemi Lawal ・2 min read

This is my first dev.to post, I'm primarily going to be writing these for myself and editing when I have enough time, so they probably won't be coherent or helpful. I'll refrain from using tags so as not to confuse others with my posts.

This post is about how I managed to fix Mysql installation error on WSL.

mysqld is running as pid 2657
sleep: cannot read realtime clock: Invalid argument
dpkg: error processing package mysql-server-8.0 (--configure):
 installed mysql-server-8.0 package post-installation script subprocess returned error exit status 1
No apport report written because the error message indicates its a followup error from a previous failure.
                                                                                                          dpkg: dependency problems prevent configuration of mysql-server:
 mysql-server depends on mysql-server-8.0; however:
  Package mysql-server-8.0 is not configured yet.

dpkg: error processing package mysql-server (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 mysql-server-8.0
 mysql-server
E: Sub-process /usr/bin/dpkg returned an error code (1)

The error is caused by things being not properly installed/set up(I guess), so the solution involves basically uninstalling and reinstalling Mysql related packages.

First start by running these commands:

sudo apt-get purge mysql*
sudo apt-get autoremove
sudo apt-get autoclean
sudo apt-get dist-upgrade

and / or

sudo apt purge mysql-client-5.7 mysql-client-core-5.7 mysql-common mysql-server-5.7 mysql-server-core-5.7 mysql-server

then

sudo apt update && sudo apt dist-upgrade && sudo apt autoremove && sudo apt -f install

finally

sudo apt install mysql-server

Posted on by:

femilawal profile

Oluwafemi Lawal

@femilawal

I'm primarily going to be writing these posts for myself and editing when I have enough time, so they probably won't be coherent or helpful.

Discussion

pic
Editor guide