Ubuntu download speed is too slow to solve

Today, I use Ubuntu to download the Roberta file locally, and the speed is very slow. 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. It is easy to replace the domestic source addresses. Fix this problem.

Table of contents

1. Back up the original source file

2. Create a new sources.list file

3. Update the apt software source

4. Optimize dependent packages

5. Update


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. Optimize dependent packages

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

Solve the problem:

 


 

Guess you like

Origin blog.csdn.net/weixin_43734080/article/details/131296825