Several problems occurred when downloading mysql-server on ubuntu:
- When using sudo apt-get install mysql-server/client or manually unpacking and installing,
enter the shell command:
sudo apt-get -f install
If the unlimited dependencies cannot be resolved, you can try to update the ubuntu source:
backup the sources.list file:
cp /etc/apt/sources.list /etc/apt/sources.list.bak
Open the sources.list file:
vi /etc/apt/sources.list
Copy the following content into sources.list:
deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
Taken here from https://www.cnblogs.com/ssxblog/p/11357126.html
Enter the shell command:
sudo apt-get update
sudo apt-get upgrade
- When typing sudo apt-get install mysql-server/client, the problem of requiring a low version always appears.
After trying to install a low version, it appears.
Then uninstall mysql-common first
sudo apt-get remove mysql-common
Then execute:
sudo apt-get install mysql-server/client