update time 2019-11-28
First, replace the foreigion image url with demestic image url
such as http://mirrors.163.com/ubuntu/
and http://mirrors.aliyun.com/ubuntu/
I was using http://us.mirrors.ustc.edu.cn/ubuntu
before.
For now i replace all http://us.mirrors.ustc.edu.cn/ubuntu
with http://mirrors.163.com/ubuntu/
in my /etc/apt/sources.list.
cd /etc/apt
# you may need bak your old sources.list
sudo cp sources.list sources.list.bak
# use your Text Editor to modify your configure file
sudo gedit sources.list
modify action in your editor ...
Second, user apt-get update
to update your apt indexs.
example:
ubuntu@ubuntu:~$ su
Password:
root@ubuntu:/home/ubuntu# apt update
Hit:1 https://download.docker.com/linux/ubuntu bionic InRelease
Hit:2 http://security.ubuntu.com/ubuntu bionic-security InRelease
Err:3 http://us.mirrors.ustc.edu.cn/ubuntu bionic InRelease
Connection failed [IP: 202.38.95.110 80]
Err:4 http://us.mirrors.ustc.edu.cn/ubuntu bionic-updates InRelease
Connection failed [IP: 202.38.95.110 80]
Err:5 http://us.mirrors.ustc.edu.cn/ubuntu bionic-backports InRelease
Connection failed [IP: 202.38.95.110 80]
Reading package lists... Done
Building dependency tree
Reading state information... Done
141 packages can be upgraded. Run 'apt list --upgradable' to see them.
W: Failed to fetch http://us.mirrors.ustc.edu.cn/ubuntu/dists/bionic/InRelease Connection failed [IP: 202.38.95.110 80]
W: Failed to fetch http://us.mirrors.ustc.edu.cn/ubuntu/dists/bionic-updates/InRelease Connection failed [IP: 202.38.95.110 80]
W: Failed to fetch http://us.mirrors.ustc.edu.cn/ubuntu/dists/bionic-backports/InRelease Connection failed [IP: 202.38.95.110 80]
W: Some index files failed to download. They have been ignored, or old ones used instead.
root@ubuntu:/home/ubuntu# cd /etc/apt
root@ubuntu:/etc/apt# sudo gedit /etc/apt/sources.list
root@ubuntu:/etc/apt# sudo apt-get update
Get:1 http://mirrors.163.com/ubuntu bionic InRelease [242 kB]
Hit:2 http://security.ubuntu.com/ubuntu bionic-security InRelease
Hit:3 https://download.docker.com/linux/ubuntu bionic InRelease
Get:4 http://mirrors.163.com/ubuntu bionic-updates InRelease [88.7 kB]
Get:5 http://mirrors.163.com/ubuntu bionic-backports InRelease [74.6 kB]
Get:6 http://mirrors.163.com/ubuntu bionic/main amd64 Packages [1,019 kB]
Get:7 http://mirrors.163.com/ubuntu bionic/main i386 Packages [1,007 kB]
Get:8 http://mirrors.163.com/ubuntu bionic/main Translation-en [516 kB]
Get:9 http://mirrors.163.com/ubuntu bionic/main amd64 DEP-11 Metadata [477 kB]
Get:10 http://mirrors.163.com/ubuntu bionic/main DEP-11 48x48 Icons [118 kB]
Get:11 http://mirrors.163.com/ubuntu bionic/main DEP-11 64x64 Icons [245 kB]
Get:12 http://mirrors.163.com/ubuntu bionic/restricted i386 Packages [9,156 B]
Get:13 http://mirrors.163.com/ubuntu bionic/restricted amd64 Packages [9,184 B]
Get:14 http://mirrors.163.com/ubuntu bionic/restricted Translation-en [3,584 B]
Get:15 http://mirrors.163.com/ubuntu bionic/universe amd64 Packages [8,570 kB]
Get:16 http://mirrors.163.com/ubuntu bionic/universe i386 Packages [8,531 kB]
Get:17 http://mirrors.163.com/ubuntu bionic/universe Translation-en [4,941 kB]
Get:18 http://mirrors.163.com/ubuntu bionic/universe amd64 DEP-11 Metadata [3,287 kB]
Get:19 http://mirrors.163.com/ubuntu bionic/universe DEP-11 48x48 Icons [2,151 kB]
Get:20 http://mirrors.163.com/ubuntu bionic/universe DEP-11 64x64 Icons [8,420 kB]
Get:21 http://mirrors.163.com/ubuntu bionic/multiverse amd64 Packages [151 kB]
Get:22 http://mirrors.163.com/ubuntu bionic/multiverse i386 Packages [144 kB]
Get:23 http://mirrors.163.com/ubuntu bionic/multiverse Translation-en [108 kB]
Get:24 http://mirrors.163.com/ubuntu bionic/multiverse amd64 DEP-11 Metadata [49.7 kB]
Get:25 http://mirrors.163.com/ubuntu bionic/multiverse DEP-11 48x48 Icons [8,931 B]
Get:26 http://mirrors.163.com/ubuntu bionic/multiverse DEP-11 64x64 Icons [225 kB]
Get:27 http://mirrors.163.com/ubuntu bionic-updates/main i386 Packages [617 kB]
Get:28 http://mirrors.163.com/ubuntu bionic-updates/main amd64 Packages [799 kB]
Get:29 http://mirrors.163.com/ubuntu bionic-updates/main Translation-en [283 kB]
Get:30 http://mirrors.163.com/ubuntu bionic-updates/main amd64 DEP-11 Metadata [294 kB]
Get:31 http://mirrors.163.com/ubuntu bionic-updates/main DEP-11 48x48 Icons [73.8 kB]
Get:32 http://mirrors.163.com/ubuntu bionic-updates/main DEP-11 64x64 Icons [143 kB]
Get:33 http://mirrors.163.com/ubuntu bionic-updates/restricted amd64 Packages [21.9 kB]
Get:34 http://mirrors.163.com/ubuntu bionic-updates/restricted i386 Packages [9,260 B]
Get:35 http://mirrors.163.com/ubuntu bionic-updates/restricted Translation-en [6,128 B]
Get:36 http://mirrors.163.com/ubuntu bionic-updates/universe amd64 Packages [1,028 kB]
Get:37 http://mirrors.163.com/ubuntu bionic-updates/universe i386 Packages [993 kB]
Get:38 http://mirrors.163.com/ubuntu bionic-updates/universe Translation-en [317 kB]
Get:39 http://mirrors.163.com/ubuntu bionic-updates/universe amd64 DEP-11 Metadata [264 kB]
Get:40 http://mirrors.163.com/ubuntu bionic-updates/universe DEP-11 48x48 Icons [198 kB]
Get:41 http://mirrors.163.com/ubuntu bionic-updates/universe DEP-11 64x64 Icons [439 kB]
Get:42 http://mirrors.163.com/ubuntu bionic-updates/multiverse i386 Packages [6,924 B]
Get:43 http://mirrors.163.com/ubuntu bionic-updates/multiverse amd64 Packages [8,520 B]
Get:44 http://mirrors.163.com/ubuntu bionic-updates/multiverse Translation-en [4,044 B]
Get:45 http://mirrors.163.com/ubuntu bionic-updates/multiverse amd64 DEP-11 Metadata [2,468 B]
Get:46 http://mirrors.163.com/ubuntu bionic-updates/multiverse DEP-11 48x48 Icons [29 B]
Get:47 http://mirrors.163.com/ubuntu bionic-updates/multiverse DEP-11 64x64 Icons [2,638 B]
Get:48 http://mirrors.163.com/ubuntu bionic-backports/main i386 Packages [2,516 B]
Get:49 http://mirrors.163.com/ubuntu bionic-backports/main amd64 Packages [2,512 B]
Get:50 http://mirrors.163.com/ubuntu bionic-backports/main Translation-en [1,644 B]
Get:51 http://mirrors.163.com/ubuntu bionic-backports/universe i386 Packages [4,028 B]
Get:52 http://mirrors.163.com/ubuntu bionic-backports/universe amd64 Packages [4,028 B]
Get:53 http://mirrors.163.com/ubuntu bionic-backports/universe Translation-en [1,856 B]
Get:54 http://mirrors.163.com/ubuntu bionic-backports/universe amd64 DEP-11 Metadata [7,972 B]
Get:55 http://mirrors.163.com/ubuntu bionic-backports/universe DEP-11 48x48 Icons [29 B]
Get:56 http://mirrors.163.com/ubuntu bionic-backports/universe DEP-11 64x64 Icons [29 B]
Fetched 45.9 MB in 16s (2,872 kB/s)
Reading package lists... Done
root@ubuntu:/etc/apt#
网友评论