T
T
TheRaccer2022-01-16 20:30:12
linux
TheRaccer, 2022-01-16 20:30:12

How to fix an error when installing Mysql on a VPS server with Ubuntu?

When I try to install mysql-server on Ubuntu, I get an error, help me figure it out.

dpkg: error processing package mysql-server-8.0 (--configure):
installed mysql-server-8.0 package post-installation script subprocess returned
error exit status 2
Setting up libcgi-pm-perl (4.46-1) ...
Setting up Libhtml-template-perl (2.97-1) ...
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
Setting up libcgi-fast-perl (1:2.15-1) ...
No apport report written because the error message indicates its a followup erro
r from a previous failure.
Processing triggers for systemd (245.4-4ubuntu3.15)

Processing triggers for man-db (2.9.1-1) ...

Not Building database; man-db/auto-update is not 'True'.
Processing triggers for libc-bin (2.31-Oubuntu9.2) ...

Errors were encountered while processing:
mysql-server-8.0
mysql-server

E: Sub-process /usr/bin/dpkg returned an error code (1)

I read a lot of various articles on this subject, but I did not find anything that helped me.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
Kirill Larin, 2022-01-16
@TheRaccer

Problem with corrupted packages
Solution

sudo apt-get purge mysql\* libmysql\*
sudo apt autoremove

sudo apt --fix-broken install
sudo apt-get --reinstall install mysql-client-core-8.0
sudo apt-get purge mysql\* libmysql\*
sudo apt autoremove
sudo apt update
sudo apt install mysql-server

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question