ubuntu 执行apt-get update报错

2024-01-07 17:41:45

系统是Ubuntu22.04 执行apt-get update 遇到如下情况

E: 无法下载 https://mirrors.tuna.tsinghua.edu.cn/ubuntu/dists/jammy/main/binary-arm64/Packages  404  Not Found [IP: 101.6.15.130 443]
E: 无法下载 https://mirrors.tuna.tsinghua.edu.cn/ubuntu/dists/jammy-updates/main/binary-arm64/Packages  404  Not Found [IP: 101.6.15.130 443]
E: 无法下载 https://mirrors.tuna.tsinghua.edu.cn/ubuntu/dists/jammy-backports/main/binary-arm64/Packages  404  Not Found [IP: 101.6.15.130 443]
E: 无法下载 https://mirrors.tuna.tsinghua.edu.cn/ubuntu/dists/jammy-security/main/binary-arm64/Packages  404  Not Found [IP: 101.6.15.130 443]

看网上说的是由于源不是https,换了中科大和清华仍然不行,后来github看到是由于我是树莓派 arm64,因为 arm64 架构的 Ubuntu 软件源不在 ubuntu/ 目录下,而在 ubuntu-ports/ 下。

在这里插入图片描述

修改后的 /etc/apt/source.list

# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释

deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ focal main restricted universe multiverse
#deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ focal main restricted universe multiverse

deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ focal-security main restricted universe multiverse
#deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ focal-security main restricted universe multiverse

deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ focal-updates main restricted universe multiverse
#deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ focal-updates main restricted universe multiverse

deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ focal-backports main restricted universe multiverse
#deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ focal-backports main restricted universe multiversee

参考链接

https://github.com/tuna/issues/issues/595

文章来源:https://blog.csdn.net/whp404/article/details/135375887
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。