Table of contents
1. Back up the original source file
2. Create a new sources.list file
3. Update the apt software source
The source files that come with the Ubuntu system are all foreign source URLs. When downloading and installing upgrade sources or dependencies in China, it is relatively slow. Changing the domestic source addresses can easily solve this problem.
1. Back up the original source file
sudo mv /etc/apt/sources.list sources.list_backup
2. Create a new sources.list file
sudo vim /etc/apt/sources.list
Enter the following content and save and exit
deb http://cn.archive.ubuntu.com/ubuntu/ xenial main restricted
deb http://cn.archive.ubuntu.com/ubuntu/ xenial-updates main restricted
deb http://cn.archive.ubuntu.com/ubuntu/ xenial universe
deb http://cn.archive.ubuntu.com/ubuntu/ xenial-updates universe
deb http://cn.archive.ubuntu.com/ubuntu/ xenial multiverse
deb http://cn.archive.ubuntu.com/ubuntu/ xenial-updates multiverse
deb http://cn.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu xenial-security main restricted
deb http://security.ubuntu.com/ubuntu xenial-security universe
deb http://security.ubuntu.com/ubuntu xenial-security multiverse
3. Update the apt software source
sudo apt-get update
4. Modify the damaged dependent package, uninstall the wrong package, and re-download the new correct version
sudo apt-get -f install
5. Update
sudo apt-get upgrade
6. Effect
before:
Now: