我是目录奥
更改源之前请确认自己的系统版本, 旧版的为stretch系统,新版为buster,别改错了!
一、新版buster系统源
1.1 第一步:修改sources.list(北外源)
在终端运行:
sudo nano /etc/apt/sources.list
将原来的每行软件源前边加“#”注释掉
在文档中添加如下软件源:
deb https://mirrors.bfsu.edu.cn/raspbian/raspbian/ buster main contrib non-free rpi
deb-src https://mirrors.bfsu.edu.cn/raspbian/raspbian/ buster main contrib non-free rpi
按ctrl+X,按Y确定保存,回车,回到终端
1.2 第二步:修改raspi.list(北外源)
运行
sudo nano /etc/apt/sources.list.d/raspi.list
将原来的每行软件源前边加“#”注释掉
在文档中添加如下软件源:
deb https://mirrors.bfsu.edu.cn/raspberrypi/ buster main ui
按ctrl+X,按Y确定保存,回车,回到终端
2.3 运行更新
sudo apt-get update
sudo apt-get upgrade
2.4 其他源
清华源亲测upgrade时比较慢,所以查询了其他源
2.4.1 清华源
sources.list内容:
deb http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/ buster main contrib non-free rpi
deb-src http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/ buster main contrib non-free rpi
raspi.list内容:
deb http://mirrors.tuna.tsinghua.edu.cn/raspberrypi/ buster main ui
deb-src http://mirrors.tuna.tsinghua.edu.cn/raspberrypi/ buster main ui
2.4.2 阿里源(配置失败,说两个源有重复配置)
sources.list内容:
deb http://mirrors.aliyun.com/raspbian/raspbian/ buster main non-free contrib
deb-src http://mirrors.aliyun.com/raspbian/raspbian/ buster main non-free contrib
raspi.list内容:
deb http://mirrors.aliyun.com/raspbian/raspbian/ buster main
deb-src http://mirrors.aliyun.com/raspbian/raspbian/ buster main
update结果(求大佬解决):
Hit:1 http://mirrors.aliyun.com/raspbian/raspbian buster InRelease
Reading package lists... Done
W: Target Sources (main/source/Sources) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list.d/raspi.list:5
W: Target Packages (main/binary-armhf/Packages) is configured multiple times in /etc/apt/sources.list:4 and /etc/apt/sources.list.d/raspi.list:4
W: Target Packages (main/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:4 and /etc/apt/sources.list.d/raspi.list:4
W: Target Translations (main/i18n/Translation-en_GB) is configured multiple times in /etc/apt/sources.list:4 and /etc/apt/sources.list.d/raspi.list:4
W: Target Translations (main/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:4 and /etc/apt/sources.list.d/raspi.list:4
W: Target Sources (main/source/Sources) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list.d/raspi.list:5
W: Target Packages (main/binary-armhf/Packages) is configured multiple times in /etc/apt/sources.list:4 and /etc/apt/sources.list.d/raspi.list:4
W: Target Packages (main/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:4 and /etc/apt/sources.list.d/raspi.list:4
W: Target Translations (main/i18n/Translation-en_GB) is configured multiple times in /etc/apt/sources.list:4 and /etc/apt/sources.list.d/raspi.list:4
W: Target Translations (main/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:4 and /etc/apt/sources.list.d/raspi.list:4
二、旧版stretch系统源
2.1 第一步:修改sources.list
在终端运行:
sudo nano /etc/apt/sources.list
将原来的每行软件源前边加“#”注释掉
在文档中添加如下软件源:
deb http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/ stretch main contrib non-free rpi
deb-src http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/ stretch main contrib non-free rpi
按ctrl+X,按Y确定保存,回车,回到终端
2.2 第二步:修改raspi.list
运行
sudo nano /etc/apt/sources.list.d/raspi.list
将原来的每行软件源前边加“#”注释掉
在文档中添加如下软件源:
deb http://mirrors.ustc.edu.cn/archive.raspberrypi.org/ stretch main ui
按ctrl+X,按Y确定保存,回车,回到终端
2.3 运行更新
sudo apt-get update
sudo apt-get upgrade
如有问题,欢迎反馈