使用说明Debian 11 (bullseye)
- 官方源
/etc/apt/sources.list
deb http://raspbian.raspberrypi.org/raspbian/ bullseye main contrib non-free rpi - #Uncomment line below then ‘apt-get update’ to enable ‘apt-get source’
- #deb-src http://raspbian.raspberrypi.org/raspbian/ bullseye main contrib non-free rpi
- /etc/apt/sources.list.d/raspi.list
deb http://archive.raspberrypi.org/debian/ bullseye main - #Uncomment line below then ‘apt-get update’ to enable ‘apt-get source’
- #deb-src http://archive.raspberrypi.org/debian/ bullseye main
1、 清华源
# 编辑 `/etc/apt/sources.list` 文件,删除原文件所有内容,用以下内容取代:
deb [arch=armhf] http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/ bullseye main non-free contrib rpi
deb-src http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/ bullseye main non-free contrib rpi
# 如果需要 arm64 软件源,在 `/etc/apt/sources.list` 中加上
deb [arch=arm64] http://mirrors.tuna.tsinghua.edu.cn/raspbian/multiarch/ bullseye main
# 编辑 `/etc/apt/sources.list.d/raspi.list` 文件,删除原文件所有内容,用以下内容取代:
deb http://mirrors.tuna.tsinghua.edu.cn/raspberrypi/ bullseye main
注意:网址末尾的raspbian
重复两次是必须的。因为 Raspbian 的仓库中除了APT软件源还包含其他代码。APT软件源不在仓库的根目录,而在raspbian/
子目录下。
编辑镜像站后,请使用sudo apt-get update
命令,更新软件源列表,同时检查您的编辑是否正确。
2、阿里源
sudo nano /etc/apt/sources.list
编辑 /etc/apt/sources.list 文件,删除原文件所有内容,用以下内容取代:
deb http://mirrors.aliyun.com/raspbian/raspbian/ bullseye main non-free contrib
deb-src http://mirrors.aliyun.com/raspbian/raspbian/ bullseye main non-free contrib
sudo nano /etc/apt/sources.list.d/raspi.list
编辑 /etc/apt/sources.list.d/raspi.list 文件,删除原文件所有内容,用以下内容取代:
deb http://mirrors.aliyun.com/raspberrypi/ bullseye main