0
$ sudo apt-get install mysql-server
[sudo] password for user: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package mysql-server

I am using Ubuntu 14.04.

Zanna
  • 70,465
Rahul
  • 3
  • How can i resolve this problem? – Rahul Nov 16 '17 at 17:13
  • Please run sudo apt-get update, then apt-cache search mysql-server – George Udosen Nov 16 '17 at 17:16
  • Then what is the next step? – Rahul Nov 16 '17 at 17:20
  • What were the results of those command? – George Udosen Nov 16 '17 at 17:21
  • First command is still running – Rahul Nov 16 '17 at 17:23
  • Both commands are over now.The result is as follows – Rahul Nov 16 '17 at 17:33
  • user@user-SM:~$ apt-cache search mysql-server mysql-server - MySQL database server (metapackage depending on the latest version) mysql-server-5.5 - MySQL database server binaries and system database setup mysql-server-core-5.5 - MySQL database server binaries – Rahul Nov 16 '17 at 17:35
  • mariadb-server-5.5 - MariaDB database server binaries mariadb-server-core-5.5 - MariaDB database core server files mysql-server-5.6 - MySQL database server binaries and system database setup mysql-server-core-5.6 - MySQL database server binaries percona-xtradb-cluster-server-5.5 - Percona Server database server binaries torrentflux - web based, feature-rich BitTorrent download manager – Rahul Nov 16 '17 at 17:36
  • What is the next step? – Rahul Nov 16 '17 at 17:37
  • Then i executed the command sudo apt-get install mysql-server – Rahul Nov 16 '17 at 17:39
  • @Videonauth I read all the answers to the duplicate question that you linked to. This question is not a duplicate of that question. It was also fake close voted for being unclear after the answer was accepted by the OP. This question is not unclear either. – karel Nov 17 '17 at 06:33

2 Answers2

1

mysql-server is a metapackage depending on the latest version of mysql-server, so it doesn't need to be installed. Open the terminal and type:

sudo apt-get update
sudo apt-get install aptitude
sudo aptitude install mysql-server-5.5 mysql-server-core-5.5
karel
  • 114,770
  • I would argue there's probably no need to install aptitude just for this? – José Luis Nov 16 '17 at 17:30
  • The reason why I included aptitude is to get more verbose error messages than apt provides in case the commands didn't work, however since the commands did work you're right, there was no need to install aptitude in this case. – karel Nov 16 '17 at 17:31
0

You should first check whether the package you are searching for exists by opening the terminal and typing:

apt search <your package name>

Select the package you want to install by typing

sudo apt-get install <the package name you found after searching>

You can do this also in the synaptic package manager app.

Zanna
  • 70,465