Ubuntu16.04 with X86_64 architecture has replaced the system source update prompt that some packages cannot be downloaded 404 Not Found

When ubuntu16.04 with X86_64 architecture replaces the system source update, it prompts E: Unable to download https://mirrors.tuna.tsinghua.edu.cn/ubuntu/dists/xenial/main/binary-arm64/Packages 404 Not Found


I. Introduction

X86_64的Ubuntu16.04系统更换了清华源,sudo apt update时提示一些包仍然无法下载

系统换源方法为:①打开sources.list ②加入源码

sudo gedit /etc/apt/sources.list

It is best to change sources.list to have executable permissions, otherwise it will report that the source cannot be used safely for updates.

sudo chmod 777 /etc/apt/sources.list

Tsinghua Source is recommended, the following are

Tsinghua source_amd architecture
Insert image description here

Tsinghuayuan_arm architecture
Insert image description here
根据自己的Ubuntu系统选择对应架构和版本


2. Cause of error

1. Multi-architecture support is set up for ARM, but our platform is based on X86 architecture


3. Solution

1. View the system architecture

arch
dpkg --print-foreign-architectures

Insert image description here

2. Remove ARM architecture support

 sudo dpkg --remove-architecture arm64

It prompts that arm is still used by the database and cannot be removed.

Insert image description here

解决方法:

sudo rm -rf /var/lib/apt/lists/*
sudo apt-get remove .*:arm64

Insert image description here

At this time, execute the removal command again, sudo apt update and it will be OK!

 sudo dpkg --remove-architecture arm64

Insert image description here
Insert image description here

4. Summary

Of course, if it is an NVIDIA Jetson series motherboard and the Ubuntu system with ARM architecture is flashed, it may prompt that some AMD packages cannot be downloaded during the update. The principle is the same.

Guess you like

Origin blog.csdn.net/qq_42535748/article/details/125836304