问题:
如下,apt-get update下不下来。
$ sudo apt-get update
Ign:1 http://mirrors.tuna.tsinghua.edu.cn/ros/ubuntu bionic InRelease
Hit:2 http://mirrors.tuna.tsinghua.edu.cn/ros/ubuntu bionic Release
Get:3 http://mirrors.aliyun.com/ubuntu bionic InRelease [242 kB]
Get:4 http://mirrors.aliyun.com/ubuntu bionic-security InRelease [88.7 kB]
Get:5 http://mirrors.aliyun.com/ubuntu bionic-updates InRelease [88.7 kB]
Get:7 http://mirrors.aliyun.com/ubuntu bionic-proposed InRelease [242 kB]
Get:8 http://mirrors.aliyun.com/ubuntu bionic-backports InRelease [74.6 kB]
Get:10 http://mirrors.aliyun.com/ubuntu bionic/main Sources [829 kB]
Get:12 http://mirrors.aliyun.com/ubuntu bionic/restricted Sources [5,324 B]
Get:13 http://mirrors.aliyun.com/ubuntu bionic/universe Sources [9,051 kB]
Get:14 http://mirrors.aliyun.com/ubuntu bionic/multiverse Sources [181 kB]
Ign:15 http://mirrors.aliyun.com/ubuntu bionic/main arm64 Packages
Get:16 http://mirrors.aliyun.com/ubuntu bionic/main Translation-en [516 kB]
Get:17 http://mirrors.aliyun.com/ubuntu bionic/main arm64 DEP-11 Metadata [472 kB]
Get:18 http://mirrors.aliyun.com/ubuntu bionic/main DEP-11 48x48 Icons [118 kB]
Get:19 http://mirrors.aliyun.com/ubuntu bionic/main DEP-11 64x64 Icons [245 kB]
Ign:20 http://mirrors.aliyun.com/ubuntu bionic/restricted arm64 Packages
Get:21 http://mirrors.aliyun.com/ubuntu bionic/restricted Translation-en [3,584 B]
Ign:22 http://mirrors.aliyun.com/ubuntu bionic/universe arm64 Packages
Get:23 http://mirrors.aliyun.com/ubuntu bionic/universe Translation-en [4,941 kB]
Get:24 http://mirrors.aliyun.com/ubuntu bionic/universe arm64 DEP-11 Metadata [3,243 kB]
Hit:9 https://international.download.nvidia.cn/jetson/repos/common r32 InRelease
Hit:11 https://international.download.nvidia.cn/jetson/repos/t210 r32 InRelease
Get:25 http://mirrors.aliyun.com/ubuntu bionic/universe DEP-11 48x48 Icons [2,151 kB]
Get:26 http://mirrors.aliyun.com/ubuntu bionic/universe DEP-11 64x64 Icons [8,420 kB]
Ign:27 http://mirrors.aliyun.com/ubuntu bionic/multiverse arm64 Packages
Get:28 http://mirrors.aliyun.com/ubuntu bionic/multiverse Translation-en [108 kB]
Get:29 http://mirrors.aliyun.com/ubuntu bionic/multiverse arm64 DEP-11 Metadata [44.4 kB]
Get:30 http://mirrors.aliyun.com/ubuntu bionic/multiverse DEP-11 48x48 Icons [8,931 B]
Get:31 http://mirrors.aliyun.com/ubuntu bionic/multiverse DEP-11 64x64 Icons [225 kB]
Get:32 http://mirrors.aliyun.com/ubuntu bionic-security/universe Sources [294 kB]
Get:33 http://mirrors.aliyun.com/ubuntu bionic-security/restricted Sources [22.7 kB]
Get:34 http://mirrors.aliyun.com/ubuntu bionic-security/main Sources [263 kB]
Get:35 http://mirrors.aliyun.com/ubuntu bionic-security/multiverse Sources [7,972 B]
Ign:36 http://mirrors.aliyun.com/ubuntu bionic-security/main arm64 Packages
Get:37 http://mirrors.aliyun.com/ubuntu bionic-security/main Translation-en [373 kB]
Get:38 http://mirrors.aliyun.com/ubuntu bionic-security/main arm64 DEP-11 Metadata [49.1 kB]
Get:39 http://mirrors.aliyun.com/ubuntu bionic-security/main DEP-11 48x48 Icons [28.9 kB]
Get:40 http://mirrors.aliyun.com/ubuntu bionic-security/main DEP-11 64x64 Icons [65.1 kB]
Ign:41 http://mirrors.aliyun.com/ubuntu bionic-security/restricted arm64 Packages
Get:42 http://mirrors.aliyun.com/ubuntu bionic-security/restricted Translation-en [88.3 kB]
Ign:43 http://mirrors.aliyun.com/ubuntu bionic-security/universe arm64 Packages
Get:44 http://mirrors.aliyun.com/ubuntu bionic-security/universe Translation-en [271 kB]
Get:45 http://mirrors.aliyun.com/ubuntu bionic-security/universe arm64 DEP-11 Metadata [54.3 kB]
Get:46 http://mirrors.aliyun.com/ubuntu bionic-security/universe DEP-11 48x48 Icons [28.4 kB]
Get:47 http://mirrors.aliyun.com/ubuntu bionic-security/universe DEP-11 64x64 Icons [139 kB]
Ign:48 http://mirrors.aliyun.com/ubuntu bionic-security/multiverse arm64 Packages
Get:49 http://mirrors.aliyun.com/ubuntu bionic-security/multiverse Translation-en [3,660 B]
Get:50 http://mirrors.aliyun.com/ubuntu bionic-security/multiverse DEP-11 48x48 Icons [29 B]
Get:51 http://mirrors.aliyun.com/ubuntu bionic-security/multiverse DEP-11 64x64 Icons [2,638 B]
Get:52 http://mirrors.aliyun.com/ubuntu bionic-updates/multiverse Sources [15.9 kB]
Get:53 http://mirrors.aliyun.com/ubuntu bionic-updates/restricted Sources [25.5 kB]
Get:54 http://mirrors.aliyun.com/ubuntu bionic-updates/main Sources [522 kB]
Get:55 http://mirrors.aliyun.com/ubuntu bionic-updates/universe Sources [471 kB]
Ign:56 http://mirrors.aliyun.com/ubuntu bionic-updates/main arm64 Packages
Get:57 http://mirrors.aliyun.com/ubuntu bionic-updates/main Translation-en [465 kB]
Get:58 http://mirrors.aliyun.com/ubuntu bionic-updates/main arm64 DEP-11 Metadata [291 kB]
Get:59 http://mirrors.aliyun.com/ubuntu bionic-updates/main DEP-11 48x48 Icons [83.0 kB]
Get:60 http://mirrors.aliyun.com/ubuntu bionic-updates/main DEP-11 64x64 Icons [154 kB]
Ign:61 http://mirrors.aliyun.com/ubuntu bionic-updates/restricted arm64 Packages
Get:62 http://mirrors.aliyun.com/ubuntu bionic-updates/restricted Translation-en [92.1 kB]
Ign:63 http://mirrors.aliyun.com/ubuntu bionic-updates/universe arm64 Packages
Get:64 http://mirrors.aliyun.com/ubuntu bionic-updates/universe Translation-en [388 kB]
Get:65 http://mirrors.aliyun.com/ubuntu bionic-updates/universe arm64 DEP-11 Metadata [295 kB]
Get:66 http://mirrors.aliyun.com/ubuntu bionic-updates/universe DEP-11 48x48 Icons [229 kB]
Get:67 http://mirrors.aliyun.com/ubuntu bionic-updates/universe DEP-11 64x64 Icons [507 kB]
Ign:68 http://mirrors.aliyun.com/ubuntu bionic-updates/multiverse arm64 Packages
Get:69 http://mirrors.aliyun.com/ubuntu bionic-updates/multiverse Translation-en [5,980 B]
Get:70 http://mirrors.aliyun.com/ubuntu bionic-updates/multiverse DEP-11 48x48 Icons [29 B]
Get:71 http://mirrors.aliyun.com/ubuntu bionic-updates/multiverse DEP-11 64x64 Icons [2,638 B]
Get:72 http://mirrors.aliyun.com/ubuntu bionic-proposed/multiverse Sources [1,988 B]
Get:73 http://mirrors.aliyun.com/ubuntu bionic-proposed/universe Sources [8,636 B]
Get:74 http://mirrors.aliyun.com/ubuntu bionic-proposed/restricted Sources [11.6 kB]
Get:75 http://mirrors.aliyun.com/ubuntu bionic-proposed/main Sources [76.9 kB]
Ign:76 http://mirrors.aliyun.com/ubuntu bionic-proposed/main arm64 Packages
Get:77 http://mirrors.aliyun.com/ubuntu bionic-proposed/main Translation-en [36.6 kB]
Get:78 http://mirrors.aliyun.com/ubuntu bionic-proposed/main arm64 DEP-11 Metadata [3,172 B]
Get:79 http://mirrors.aliyun.com/ubuntu bionic-proposed/main DEP-11 48x48 Icons [3,976 B]
Get:80 http://mirrors.aliyun.com/ubuntu bionic-proposed/main DEP-11 64x64 Icons [5,795 B]
Ign:81 http://mirrors.aliyun.com/ubuntu bionic-proposed/restricted arm64 Packages
Get:82 http://mirrors.aliyun.com/ubuntu bionic-proposed/restricted Translation-en [20.0 kB]
Ign:83 http://mirrors.aliyun.com/ubuntu bionic-proposed/universe arm64 Packages
Get:84 http://mirrors.aliyun.com/ubuntu bionic-proposed/universe Translation-en [7,736 B]
Get:85 http://mirrors.aliyun.com/ubuntu bionic-proposed/universe arm64 DEP-11 Metadata [212 B]
Get:86 http://mirrors.aliyun.com/ubuntu bionic-proposed/universe DEP-11 48x48 Icons [29 B]
Get:87 http://mirrors.aliyun.com/ubuntu bionic-proposed/universe DEP-11 64x64 Icons [29 B]
Get:88 http://mirrors.aliyun.com/ubuntu bionic-proposed/multiverse Translation-en [788 B]
Get:89 http://mirrors.aliyun.com/ubuntu bionic-proposed/multiverse arm64 DEP-11 Metadata [3,928 B]
Get:90 http://mirrors.aliyun.com/ubuntu bionic-proposed/multiverse DEP-11 48x48 Icons [29 B]
Get:91 http://mirrors.aliyun.com/ubuntu bionic-proposed/multiverse DEP-11 64x64 Icons [2,638 B]
Get:92 http://mirrors.aliyun.com/ubuntu bionic-backports/main Sources [5,476 B]
Get:93 http://mirrors.aliyun.com/ubuntu bionic-backports/universe Sources [6,600 B]
Ign:94 http://mirrors.aliyun.com/ubuntu bionic-backports/main arm64 Packages
Get:95 http://mirrors.aliyun.com/ubuntu bionic-backports/main Translation-en [4,824 B]
Ign:96 http://mirrors.aliyun.com/ubuntu bionic-backports/universe arm64 Packages
Get:97 http://mirrors.aliyun.com/ubuntu bionic-backports/universe Translation-en [5,772 B]
Get:98 http://mirrors.aliyun.com/ubuntu bionic-backports/universe arm64 DEP-11 Metadata [9,268 B]
Get:99 http://mirrors.aliyun.com/ubuntu bionic-backports/universe DEP-11 48x48 Icons [2,809 B]
Get:100 http://mirrors.aliyun.com/ubuntu bionic-backports/universe DEP-11 64x64 Icons [3,943 B]
Ign:15 http://mirrors.aliyun.com/ubuntu bionic/main arm64 Packages
Ign:20 http://mirrors.aliyun.com/ubuntu bionic/restricted arm64 Packages
Ign:22 http://mirrors.aliyun.com/ubuntu bionic/universe arm64 Packages
Ign:27 http://mirrors.aliyun.com/ubuntu bionic/multiverse arm64 Packages
Ign:36 http://mirrors.aliyun.com/ubuntu bionic-security/main arm64 Packages
Ign:41 http://mirrors.aliyun.com/ubuntu bionic-security/restricted arm64 Packages
Ign:43 http://mirrors.aliyun.com/ubuntu bionic-security/universe arm64 Packages
Ign:48 http://mirrors.aliyun.com/ubuntu bionic-security/multiverse arm64 Packages
Ign:56 http://mirrors.aliyun.com/ubuntu bionic-updates/main arm64 Packages
Ign:61 http://mirrors.aliyun.com/ubuntu bionic-updates/restricted arm64 Packages
Ign:63 http://mirrors.aliyun.com/ubuntu bionic-updates/universe arm64 Packages
Ign:68 http://mirrors.aliyun.com/ubuntu bionic-updates/multiverse arm64 Packages
Ign:76 http://mirrors.aliyun.com/ubuntu bionic-proposed/main arm64 Packages
Ign:81 http://mirrors.aliyun.com/ubuntu bionic-proposed/restricted arm64 Packages
Ign:83 http://mirrors.aliyun.com/ubuntu bionic-proposed/universe arm64 Packages
Ign:94 http://mirrors.aliyun.com/ubuntu bionic-backports/main arm64 Packages
Ign:96 http://mirrors.aliyun.com/ubuntu bionic-backports/universe arm64 Packages
Ign:15 http://mirrors.aliyun.com/ubuntu bionic/main arm64 Packages
Ign:20 http://mirrors.aliyun.com/ubuntu bionic/restricted arm64 Packages
Ign:22 http://mirrors.aliyun.com/ubuntu bionic/universe arm64 Packages
Ign:27 http://mirrors.aliyun.com/ubuntu bionic/multiverse arm64 Packages
Ign:36 http://mirrors.aliyun.com/ubuntu bionic-security/main arm64 Packages
Ign:41 http://mirrors.aliyun.com/ubuntu bionic-security/restricted arm64 Packages
Ign:43 http://mirrors.aliyun.com/ubuntu bionic-security/universe arm64 Packages
Ign:48 http://mirrors.aliyun.com/ubuntu bionic-security/multiverse arm64 Packages
Ign:56 http://mirrors.aliyun.com/ubuntu bionic-updates/main arm64 Packages
Ign:61 http://mirrors.aliyun.com/ubuntu bionic-updates/restricted arm64 Packages
Ign:63 http://mirrors.aliyun.com/ubuntu bionic-updates/universe arm64 Packages
Ign:68 http://mirrors.aliyun.com/ubuntu bionic-updates/multiverse arm64 Packages
Ign:76 http://mirrors.aliyun.com/ubuntu bionic-proposed/main arm64 Packages
Ign:81 http://mirrors.aliyun.com/ubuntu bionic-proposed/restricted arm64 Packages
Ign:83 http://mirrors.aliyun.com/ubuntu bionic-proposed/universe arm64 Packages
Ign:94 http://mirrors.aliyun.com/ubuntu bionic-backports/main arm64 Packages
Ign:96 http://mirrors.aliyun.com/ubuntu bionic-backports/universe arm64 Packages
Err:15 http://mirrors.aliyun.com/ubuntu bionic/main arm64 Packages
404 Not Found [IP: 221.204.23.248 80]
Ign:20 http://mirrors.aliyun.com/ubuntu bionic/restricted arm64 Packages
Ign:22 http://mirrors.aliyun.com/ubuntu bionic/universe arm64 Packages
Ign:27 http://mirrors.aliyun.com/ubuntu bionic/multiverse arm64 Packages
Err:36 http://mirrors.aliyun.com/ubuntu bionic-security/main arm64 Packages
404 Not Found [IP: 221.204.23.248 80]
Ign:41 http://mirrors.aliyun.com/ubuntu bionic-security/restricted arm64 Packages
Ign:43 http://mirrors.aliyun.com/ubuntu bionic-security/universe arm64 Packages
Ign:48 http://mirrors.aliyun.com/ubuntu bionic-security/multiverse arm64 Packages
Err:56 http://mirrors.aliyun.com/ubuntu bionic-updates/main arm64 Packages
404 Not Found [IP: 221.204.23.248 80]
Ign:61 http://mirrors.aliyun.com/ubuntu bionic-updates/restricted arm64 Packages
Ign:63 http://mirrors.aliyun.com/ubuntu bionic-updates/universe arm64 Packages
Ign:68 http://mirrors.aliyun.com/ubuntu bionic-updates/multiverse arm64 Packages
Err:76 http://mirrors.aliyun.com/ubuntu bionic-proposed/main arm64 Packages
404 Not Found [IP: 221.204.23.248 80]
Ign:81 http://mirrors.aliyun.com/ubuntu bionic-proposed/restricted arm64 Packages
Ign:83 http://mirrors.aliyun.com/ubuntu bionic-proposed/universe arm64 Packages
Err:94 http://mirrors.aliyun.com/ubuntu bionic-backports/main arm64 Packages
404 Not Found [IP: 221.204.23.248 80]
Ign:96 http://mirrors.aliyun.com/ubuntu bionic-backports/universe arm64 Packages
Fetched 36.8 MB in 24s (1,541 kB/s)
Reading package lists... Done
E: Failed to fetch http://mirrors.aliyun.com/ubuntu/dists/bionic/main/binary-arm64/Packages 404 Not Found [IP: 221.204.23.248 80]
E: Failed to fetch http://mirrors.aliyun.com/ubuntu/dists/bionic-security/main/binary-arm64/Packages 404 Not Found [IP: 221.204.23.248 80]
E: Failed to fetch http://mirrors.aliyun.com/ubuntu/dists/bionic-updates/main/binary-arm64/Packages 404 Not Found [IP: 221.204.23.248 80]
E: Failed to fetch http://mirrors.aliyun.com/ubuntu/dists/bionic-proposed/main/binary-arm64/Packages 404 Not Found [IP: 221.204.23.248 80]
E: Failed to fetch http://mirrors.aliyun.com/ubuntu/dists/bionic-backports/main/binary-arm64/Packages 404 Not Found [IP: 221.204.23.248 80]
E: Some index files failed to download. They have been ignored, or old ones used instead.
最终排查到的原因:
和网络全无关系,而是本机器的cpu是arm架构,各种教程基本默认教你配x86的源,用错源自然找不到所需的包裹信息,报404错误。
解决方法:
把阿里源or清华源的url里的ubuntu全部替换成ubuntu-ports,然后重新apt-get update,比如Ubuntu 18.04的清华源改成如下:
# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic-updates main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic-backports main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic-backports main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic-security main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic-security main restricted universe multiverse
# 预发布软件源,不建议启用
# deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic-proposed main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic-proposed main restricted universe multiverse
参考:
版权声明:本文为seaofbits原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。