系统换源出现的问题:
W: GPG error: http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/bookworm InRelease: Key is stored in legacy trusted.gpg keyring(/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.
下载的文件丢失,输入以下指令将文件打开:
sudo nano /etc/apt/sources.list.d/raspi.list
配置文件:
deb http://archive.raspberrypi.com/debian/ bookworm main
# Uncomment line below then 'apt-get update' to enable 'apt-get source'
#deb-src http://archive.raspberrypi.com/debian/ bookworm main
deb https://mirrors.tuna.tsinghua.edu.cn/raspberrypi/ bookworm main
按下Ctrl+O保存
打开
sudo nano /etc/apt/sources.list
#deb http://deb.debian.org/debian bookworm main contrib non-free non-free-firmw>
#deb http://deb.debian.org/debian-security/ bookworm-security main contrib non->
#deb http://deb.debian.org/debian bookworm-updates main contrib non-free non-fr>
# Uncomment deb-src lines below then 'apt-get update' to enable 'apt-get source'
#deb-src http://deb.debian.org/debian bookworm main contrib non-free non-free-f>
#deb-src http://deb.debian.org/debian-security/ bookworm-security main contrib >
#deb-src http://deb.debian.org/debian bookworm-updates main contrib non-free no>
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm main contrib non-free>
# deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm main contrib no>
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-updates main contrib >
# deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-updates main co>
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-backports main contri>
# deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-backports main >
deb https://security.debian.org/debian-security bookworm-security main contrib>
# deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-security main c>
按下Ctrl+O进行保存
Ctrl+Alt+T新建命令输入sudo apt update,解决问题。