https://mirrors.tuna.tsinghua.edu.cn/help/raspbian/

>  uname -m
aarch64    -- 需要是arch64
#!/bin/bash
#设置时区上海
timedatectl set-timezone Asia/Shanghai
#备份并且更新 软件更新源
cp /etc/apt/sources.list /etc/apt/sources.list.bak
echo "deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye main contrib non-free" > /etc/apt/sources.list
echo "deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye main contrib non-free" >> /etc/apt/sources.list
echo "deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-updates main contrib non-free" >> /etc/apt/sources.list
echo "deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-updates main contrib non-free" >> /etc/apt/sources.list
echo "deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-backports main contrib non-free" >> /etc/apt/sources.list
echo "deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-backports main contrib non-free" >> /etc/apt/sources.list
echo "deb https://mirrors.tuna.tsinghua.edu.cn/debian-security bullseye-security main contrib non-free" >> /etc/apt/sources.list
echo "deb-src https://mirrors.tuna.tsinghua.edu.cn/debian-security bullseye-security main contrib non-free" >> /etc/apt/sources.list
#备份并且更新 系统更新源
cp /etc/apt/sources.list.d/raspi.list /etc/apt/sources.list.d/raspi.list.bak
echo "deb http://mirrors.tuna.tsinghua.edu.cn/raspberrypi/ bullseye main" > /etc/apt/sources.list.d/raspi.list
echo "deb-src http://mirrors.tuna.tsinghua.edu.cn/raspberrypi/ buster main ui" > /etc/apt/sources.list.d/raspi.list
#同步更新源
sudo apt-get update
#更新升级以安装软件包 耗时较长,需要的时候再放开注释
#sudo apt-get upgrade
#安装vim,根据需要再放开注释
sudo apt-get install vim
#pip换源
mkdir -p ~/.pip
touch ~/.pip/pip.conf
echo "index-url = https://mirrors.aliyun.com/pypi/simple/" > ~/.pip/pip.conf

或者直接运行 "RUN: bash <(curl -sSL https://gitee.com/SuperManito/LinuxMirrors/raw/main/ChangeMirrors.sh)"