树莓派(ARM64 架构)Ubuntu 24.04 (Noble) 系统 `apt update` 报错解决方案

以下是针对树莓派(ARM64 架构)Ubuntu 24.04 (Noble) 系统 apt update 报错的最终解决方案总结:


问题原因

  1. 初始错误 (Transaction was already aborted):APT 缓存损坏或镜像源同步问题
  2. 后续错误 (404 Not Found for binary-arm64):ARM64 架构误用了仅支持 AMD64 的 ubuntu 镜像源

最终解决方案

步骤 1:备份原配置

bash 复制代码
sudo cp /etc/apt/sources.list.d/ubuntu.sources /etc/apt/sources.list.d/ubuntu.sources.bak

步骤 2:修改为 ARM64 适用的 Ubuntu Ports 国内源

bash 复制代码
sudo tee /etc/apt/sources.list.d/ubuntu.sources << 'EOF'
Types: deb
URIs: http://mirrors.aliyun.com/ubuntu-ports/
Suites: noble noble-updates noble-backports
Components: main universe restricted multiverse
Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg

Types: deb-src
URIs: http://mirrors.aliyun.com/ubuntu-ports/
Suites: noble-backports noble-updates noble noble-security
Components: main universe restricted multiverse
Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg

Types: deb
URIs: http://mirrors.aliyun.com/ubuntu-ports/
Suites: noble-security
Components: main universe restricted multiverse
Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg
EOF

步骤 3:清理缓存并更新

bash 复制代码
sudo rm -rf /var/lib/apt/lists/*
sudo apt clean
sudo apt update

关键要点

项目 说明
适用架构 ARM64 / aarch64(树莓派、ARM 服务器等)
镜像源关键区别 必须使用 ubuntu-ports 而非 ubuntu
推荐国内镜像 阿里云 mirrors.aliyun.com/ubuntu-ports/
其他可选镜像 清华 mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/、中科大 mirrors.ustc.edu.cn/ubuntu-ports/

验证命令

bash 复制代码
# 确认系统架构
dpkg --print-architecture  # 应输出: arm64

# 确认 apt 正常工作
sudo apt update && sudo apt upgrade -y
相关推荐
来自晴朗的明天9 小时前
16、电压跟随器(缓冲器)电路
单片机·嵌入式硬件·硬件工程
钰珠AIOT10 小时前
在同一块电路板上同时存在 0805 0603 不同的封装有什么利弊?
嵌入式硬件
代码游侠10 小时前
复习——Linux设备驱动开发笔记
linux·arm开发·驱动开发·笔记·嵌入式硬件·架构
CODECOLLECT1 天前
京元 I62D Windows PDA 技术拆解:Windows 10 IoT 兼容 + 硬解码模块,如何降低工业软件迁移成本?
stm32·单片机·嵌入式硬件
BackCatK Chen1 天前
STM32+FreeRTOS:嵌入式开发的黄金搭档,未来十年就靠它了!
stm32·单片机·嵌入式硬件·freertos·低功耗·rtdbs·工业控制
全栈游侠1 天前
STM32F103XX 02-电源与备份寄存器
stm32·单片机·嵌入式硬件
Lsir10110_1 天前
【Linux】中断 —— 操作系统的运行基石
linux·运维·嵌入式硬件
深圳市九鼎创展科技1 天前
瑞芯微 RK3399 开发板 X3399 评测:高性能 ARM 平台的多面手
linux·arm开发·人工智能·单片机·嵌入式硬件·边缘计算