ubuntu 执行apt-get update报错

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

bash 复制代码
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

bash 复制代码
# 默认注释了源码镜像以提高 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

相关推荐
啊吧怪不啊吧1 小时前
UU远程协助迎来升级!第一期更新实测
运维·服务器·远程工作
C_心欲无痕7 小时前
ts - tsconfig.json配置讲解
linux·前端·ubuntu·typescript·json
冰西瓜6007 小时前
国科大2025操作系统高级教程期末回忆版
linux
HIT_Weston8 小时前
93、【Ubuntu】【Hugo】搭建私人博客:面包屑(一)
linux·运维·ubuntu
cuijiecheng20188 小时前
Linux下Beyond Compare过期
linux·运维·服务器
喵叔哟8 小时前
20.部署与运维
运维·docker·容器·.net
HIT_Weston9 小时前
92、【Ubuntu】【Hugo】搭建私人博客:侧边导航栏(六)
linux·运维·ubuntu
CodeAllen嵌入式9 小时前
Windows 11 本地安装 WSL 支持 Ubuntu 24.04 完整指南
linux·运维·ubuntu
码农小韩10 小时前
基于Linux的C++学习——指针
linux·开发语言·c++·学习·算法
wdfk_prog10 小时前
[Linux]学习笔记系列 -- [fs]seq_file
linux·笔记·学习