MySQL: Package 'mysql-server' has no installation candidate

user3044569 picture user3044569 · Nov 28, 2013 · Viewed 17.6k times · Source

This error is being shown whenever I want to install any software via command line. Even if i try to install softwares which I know are present at the source from where I am downloading.

Below is the full error message i am getting :

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package mysql-server is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'mysql-server' has no installation candidate

Answer

Nitish770 picture Nitish770 · Jun 29, 2020

It worked for me.
If you have followed all the previous steps successfully and after running sudo apt-get install mysql-server you are getting an error then try this

    sudo apt-get install mariadb-server