I am new in debian and I'm trying to install mysql, But when I do these commands :

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

then this error will come up :

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package mysql-server is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'mysql-server' has no installation candidate

Plus when I use the command sudo apt-get update this error comes up :

Ign:8 https://repo.mysql.com/apt/debian/dists/buster/mysql-8.0/binary-amd64/Packages buster InRelease
Ign:9 https://repo.mysql.com/apt/debian/dists/buster/mysql-tools/binary-i386/Packages buster InRelease
Err:10 https://repo.mysql.com/apt/debian/dists/buster/mysql-8.0/binary-amd64/Packages buster Release
  Redirection from https to 'http://www.mysql.com/downloads/embargo.html' is forbidden [IP: 443]
Ign:11 http://ppa.launchpad.net/webupd8team/atom/ubuntu eoan InRelease                      
Err:12 https://repo.mysql.com/apt/debian/dists/buster/mysql-tools/binary-i386/Packages buster Release
  Redirection from https to 'http://www.mysql.com/downloads/embargo.html' is forbidden [IP: 443]
Err:13 http://ppa.launchpad.net/noobslab/apps/ubuntu eoan Release                           
  404  Not Found [IP: 80]

In Debian there's no MySql in the standard repositories. There's the equivalent of it named MariaDB with the corresponding package mariadb-server. As for the errors, you must have followed (I guess) some tutorial and introduced some mess in the repositories, which you most likely should clean up now. I'd try to find out what exactly has been added to the repository lists, what's been installed, and what should be removed now. You can get this info from your shell history and possibly the package management logs.

To give a more comprehensive answer, you might want to stick to MySql and install it from their installers, but make sure you really want to. This is a tougher way in comparison to the Debian's default MariaDB.

| improve this answer | |
  • How can I access to shell history and package manager logs ? – amirhosein Sep 11 '19 at 23:18
  • @amirhosein 1. Try the command history. 2. Check /var/log/apt and /var/log/dpkg. – user147505 Sep 11 '19 at 23:19
  • I think i removed some packages by using sudo apt --fix-broken install command. How can I find out which packages are lust to install them again? – amirhosein Sep 11 '19 at 23:21
  • @amirhosein If your Debian is next to new with no important data nor configurations and you can install a new one, you might think of reinstalling it... (Possibly after a backup too in case there's anything to back up.) – user147505 Sep 11 '19 at 23:22
  • I am new in linux and I have a project with a deadline that doesn't let me do that. plus I live in Iran and because of that I am banned from so many servers and services and I can't find a vpn connection that solve these issues. – amirhosein Sep 11 '19 at 23:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.