【errors】修改树莓派软件源为中科大源

试图修改树莓派软件源为中科大源(stretch)

pi@raspberrypi:~ $ sudo vi /etc/apt/sources.list

然后修改如下:
【errors】修改树莓派软件源为中科大源_第1张图片
执行 apt update 时报错:
Failed to fetch http://mirrors.ustc.edu.cn/archive.raspberrypi.org/dists/stretch/main/binary-armhf/Packages 404 Not Found [IP: 2001:da8:d800:95::110 80]
【errors】修改树莓派软件源为中科大源_第2张图片

解决

之前修改过的 sources.list 变更如下:
【errors】修改树莓派软件源为中科大源_第3张图片
然后注释掉的这行加一个debian的子文件写到 /etc/apt/sources.list.d/raspi.list 中:

pi@raspberrypi:~ $ sudo vi /etc/apt/sources.list.d/raspi.list

在这里插入图片描述

再来

pi@raspberrypi:~ $ sudo apt update
Hit:1 http://mirrors.ustc.edu.cn/raspbian/raspbian stretch InRelease
Get:2 http://mirrors.ustc.edu.cn/archive.raspberrypi.org/debian stretch InRelease [25.4 kB]
Get:3 http://mirrors.ustc.edu.cn/archive.raspberrypi.org/debian stretch/main armhf Packages [222 kB]
Get:4 http://mirrors.ustc.edu.cn/archive.raspberrypi.org/debian stretch/ui armhf Packages [44.9 kB]
Fetched 293 kB in 3s (85.5 kB/s)
Reading package lists… Done
Building dependency tree
Reading state information… Done
282 packages can be upgraded. Run ‘apt list --upgradable’ to see them.
pi@raspberrypi:~ $ sudo apt -y update
Hit:1 http://mirrors.ustc.edu.cn/raspbian/raspbian stretch InRelease
Hit:2 http://mirrors.ustc.edu.cn/archive.raspberrypi.org/debian stretch InRelease
Reading package lists… Done
Building dependency tree
Reading state information… Done
282 packages can be upgraded. Run ‘apt list --upgradable’ to see them.

你可能感兴趣的:(杂)