Linux ubuntu apt源

2021/5/21 7:28:30

本文主要是介绍Linux ubuntu apt源,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!

  

 1 # 用apt edit-sources也可以
 2 [17:14:44 root@ubuntu1804 ~]#vim /etc/apt/sources.list
 3 
 4 [17:24:22 root@ubuntu1804 ~]#vim /etc/apt/sources.list
 5 
 6 # 
 7 deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
 8 deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
 9 
10 deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
11 deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
12 
13 deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
14 deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
15 
16 deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
17 deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
18 
19 deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
20 deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
21 ~                                                                                                          
22 #更新
23 [17:24:16 root@ubuntu1804 ~]#apt update
24 
25 
26 #如果报错如下图,请检查是否能上网,一般会出现在网卡的dns设置
27 [17:14:42 root@ubuntu1804 ~]#apt update
28 Err:1 http://mirrors.aliyun.com/ubuntu bionic InRelease
29   Temporary failure resolving 'mirrors.aliyun.com'
30 Err:2 http://mirrors.aliyun.com/ubuntu bionic-proposed InRelease
31   Temporary failure resolving 'mirrors.aliyun.com'
32 Err:3 http://mirrors.aliyun.com/ubuntu bionic-updates InRelease
33   Temporary failure resolving 'mirrors.aliyun.com'
34 Err:4 http://mirrors.aliyun.com/ubuntu bionic-backports InRelease
35   Temporary failure resolving 'mirrors.aliyun.com'
36 Err:5 http://mirrors.aliyun.com/ubuntu bionic-security InRelease
37   Temporary failure resolving 'mirrors.aliyun.com'
38 Reading package lists... Done
39 Building dependency tree       
40 Reading state information... Done
41 All packages are up to date.
42 W: Failed to fetch http://mirrors.aliyun.com/ubuntu/dists/bionic/InRelease  Temporary failure resolving 'mirrors.aliyun.com'
43 W: Failed to fetch http://mirrors.aliyun.com/ubuntu/dists/bionic-proposed/InRelease  Temporary failure resolving 'mirrors.aliyun.com'
44 W: Failed to fetch http://mirrors.aliyun.com/ubuntu/dists/bionic-updates/InRelease  Temporary failure resolving 'mirrors.aliyun.com'
45 W: Failed to fetch http://mirrors.aliyun.com/ubuntu/dists/bionic-backports/InRelease  Temporary failure resolving 'mirrors.aliyun.com'
46 W: Failed to fetch http://mirrors.aliyun.com/ubuntu/dists/bionic-security/InRelease  Temporary failure resolving 'mirrors.aliyun.com'
47 W: Some index files failed to download. They have been ignored, or old ones used instead.

 



这篇关于Linux ubuntu apt源的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!


扫一扫关注最新编程教程