0

i am using ubuntu 15.10

sudo apt-get install mysql-server

output:

Reading package lists... Done  
Building dependency tree   
Reading state information... Done  
E: Unable to locate package mysql-server

Tell me what are the possible reason and how to solve it.

Thomas Ward
  • 74,764

2 Answers2

0

It is because you haven't updated your repositories try this

  sudo apt-get update
  sudo apt-get upgrade
  sudo apt-get install mysql-server
0

The first thing you will want to update your repository cache. Always do this before attempting to install or upgrade anything.

$ sudo apt-get update

You can search for packages at this point using apt-cache you do NOT need root privileges for this:

$ apt-cache search mysql-server

This will output matching package metadata and simply use apt-get install to install it.

Further information you can refer to the manual with man.

$ man apt-get
$ man apt-cache

To learn how to use man you can read the man manual man man

Ash
  • 459
  • 1
  • 5
  • 13