Maria Piaredryj
Maria Piaredryj

Reputation: 1662

Ubuntu "E: Unable to locate package mysql"

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

Upvotes: 15

Views: 76132

Answers (3)

Steven
Steven

Reputation: 35

Try using deb http://kali.download/kali/ kali-rolling main contrib non-free in your sources.list file.

Then run

apt update & upgrade

then run

apt install mysql-server

Upvotes: -1

Shubham Singh
Shubham Singh

Reputation: 41

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

then

sudo apt-get install mysql-server

Upvotes: 2

Krzysztof Dziembała
Krzysztof Dziembała

Reputation: 428

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

Upvotes: 24

Related Questions