树莓派(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
相关推荐
_Ningye12 小时前
STM32 — 6.1 TIM定时中断
stm32·单片机·嵌入式硬件
小白学电子_12 小时前
proteus仿真51单片机通过矩阵按键和数码管制作简单计算器
嵌入式硬件·51单片机·proteus
17(无规则自律)15 小时前
【Linux驱动实战】:字符设备之ioctl与mutex全解析
linux·c语言·驱动开发·嵌入式硬件
电子工程师成长日记-C5115 小时前
51单片机4乘4计算器
单片机·嵌入式硬件·51单片机
没有医保李先生15 小时前
esp32和stm32的工程宏定义
stm32·单片机·嵌入式硬件
szxinmai主板定制专家16 小时前
基于ZYNQ MPSOC船舶数据采集仪器设计(一)总体设计方案,包括振动、压力、温度、流量等参数
arm开发·人工智能·嵌入式硬件·fpga开发
2501_9181269117 小时前
学习所有6502写游戏存档的语句
汇编·嵌入式硬件·学习·游戏·个人开发
普中科技17 小时前
【普中STM32F1xx开发攻略--标准库版】-- 第 38 章 RS485 通信实验
stm32·单片机·嵌入式硬件·开发板·通信·rs485·普中科技
DLGXY17 小时前
STM32(二十七)——独立看门狗&窗口看门狗
stm32·嵌入式硬件·算法
weixin_4629019717 小时前
方案 3:手机控制 ESP32
单片机·嵌入式硬件