原创

树莓派更换清华大学源

打开终端,执行:

nano /etc/apt/sources.list.d/raspi.list

将文件改为:

deb https://mirrors.tuna.tsinghua.edu.cn/raspberrypi/ bullseye main
# 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

保存以上文件后,执行:

nano /etc/apt/sources.list

替换内容如下:

deb https://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/ bullseye main non-free contrib rpi

#deb http://deb.debian.org/debian bullseye main contrib non-free
#deb http://deb.debian.org/debian-security/ bullseye-security main contrib non-free
#deb http://deb.debian.org/debian bullseye-updates main

# Uncomment lines below then 'apt-get update' to enable 'apt-get source'
#deb-src http://deb.debian.org/debian bullseye main contrib non-free
#deb-src http://deb.debian.org/debian-security/ bullseye-security main contrib non-free
#deb-src http://deb.debian.org/debian bullseye-updates main

# This system was installed using small removable media
# (e.g. netinst, live or single CD). The matching "deb cdrom"
# entries were disabled at the end of the installation process.
# For information about how to configure apt package sources,
# see the sources.list(5) manual.

同步更新源:

sudo apt-get update
sudo apt-get upgrade

完成!

正文到此结束