Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ubuntu "E: Unable to locate package mysql"

Tags:

linux

ubuntu

Can't solve the problem because nothing helps. Try to install mysql but package is not found. gedit and some other packages looks the same.

Firstly repositories were with subdomain 'by.' (because of regional settings). But I changed them to main server without subdomain. Maybe this caused problems?

I use xubuntu 16.04 xenial xerus.

source.list is

# deb cdrom:[Xubuntu 16.04.1 LTS _Xenial Xerus_ - Release amd64 (20160719)]/ xenial main multiverse restricted universe

deb http://archive.ubuntu.com/ubuntu xenial main restricted    
deb http://archive.ubuntu.com/ubuntu xenial-updates main restricted    
deb http://archive.ubuntu.com/ubuntu xenial universe    
deb http://archive.ubuntu.com/ubuntu xenial-updates universe    
deb http://archive.ubuntu.com/ubuntu xenial multiverse
deb http://archive.ubuntu.com/ubuntu xenial-updates multiverse   
deb http://archive.ubuntu.com/ubuntu xenial-backports main restricted universe multiverse    
deb http://archive.canonical.com/ubuntu xenial partner
deb-src http://archive.canonical.com/ubuntu xenial partner    
deb http://archive.ubuntu.com/ubuntu xenial-security main restricted    
deb http://archive.ubuntu.com/ubuntu xenial-security universe    
deb http://archive.ubuntu.com/ubuntu xenial-security multiverse

apt-get update, apt-get upgrade doesn't help

like image 371
Maryja Piaredryj Avatar asked Jan 29 '17 13:01

Maryja Piaredryj


2 Answers

There is no package with the name of 'mysql' in the repositories.

If you would like to to connect other mysql servers, you need the mysql-client package: sudo apt-get install mysql-client.

If you want to host a database you need the mysql-server package: sudo apt-get install mysql-server.

Installation guide: https://www.digitalocean.com/community/tutorials/how-to-install-mysql-on-ubuntu-16-04

like image 195
Krzysztof Dziembała Avatar answered Sep 21 '22 14:09

Krzysztof Dziembała


sudo apt-get update && sudo apt-get dist-upgrade

then

sudo apt-get install mysql-server

like image 32
Shubham Singh Avatar answered Sep 21 '22 14:09

Shubham Singh