Ubuntu – E: Unable to locate package thesql-server

MySQLpackage-management

After an import of another database, the mysql root@localhost was not taking. I know that it worked because the data got imported and I was able to change the password of the user that was imported using root. However, after a day running, I tried to login as root and I couldn't. I tried a bunch of other web suggestions, etc., but none worked. I was running mysql-server-5.7. Anyway, since I knew that I just needed to recover the data, I said let me reinstall it and I would be on my way. WEll, I was wrong. For some reason, I was not able to uninstall it, nor install it back. Finding a few web suggestions, I am now at this state where when I type,

apt-get install mysql-server

I get.

root@GBRTEF01LX005:/home/bzadmin# apt-get install mysql-server
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package mysql-server

Any other suggestions? Thanks.

josé

Best Answer

It seems that your /etc/apt/sources.list is absolutely broken.

Try to fill it with the following contents:

deb http://archive.ubuntu.com/ubuntu xenial main restricted universe
deb http://archive.ubuntu.com/ubuntu xenial-updates main restricted 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-security main restricted universe
deb http://archive.ubuntu.com/ubuntu xenial-security multiverse

deb http://archive.canonical.com/ubuntu xenial partner

Then run:

sudo apt-get update
sudo apt-get dist-upgrade
sudo apt-get install mysql-server
Related Question