0

using the following command

1.sudo apt update
2.sudo apt install mysql-server

Getting below error

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies: mysql-server : Depends: mysql-server-5.7 but it is not going to be installed E: Unable to correct problems, you have held broken packages.

Any help ?

1 Answers1

0

my friend. It seems you have a bug with repositories.

So first, remove all non-official repositories from the distribution. Or third-party repositories.

Then, run

sudo apt update

Then you can install MySQL 8 by adding the official repository

wget https://dev.mysql.com/get/mysql-apt-config_0.8.14-1_all.deb
sudo dpkg -i mysql-apt-config_0.8.14-1_all.deb

Refresh APT again

sudo apt update

And perform the MySQL installation

sudo apt install mysql-server 

And also you can install the client.

Here is the reference.It should be enough.

  • Reading package lists... Error! E: flAbsPath on /var/lib/dpkg/status failed - realpath (2: No such file or directory) E: Could not open file - open (2: No such file or directory) E: Problem opening E: The package lists or status file could not be parsed or opened. – MANISH KANVADIYA Mar 05 '21 at 09:33
  • getting above error while using sudo apt update – MANISH KANVADIYA Mar 05 '21 at 09:34
  • So first, remove all non-official repositories from the distribution. Or third-party repositories.

    how to remove that sorry but i am new in that

    – MANISH KANVADIYA Mar 05 '21 at 09:35