執行
sudo apt update
出現這個錯誤:
W: http://raspbian.raspberrypi.com/raspbian/dists/bookworm/InRelease: Key is stored in legacy tusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for de trails.
解決方法:
$ apt-key list | grep -A4 "trusted.gpg$" Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)). /etc/apt/trusted.gpg -------------------- pub rsa2048 2012-04-01 [SC] A0DA 38D0 D76E 8B5D 6388 7281 9165 938D 90FD DD2E uid [ unknown] Mike Thompson (Raspberry Pi Debian armhf ARMv6+VFP) <mpthompson@gmail.com>$ sudo apt-key export 90FDDD2E | sudo gpg --dearmor -o /tmp/raspi.gpg
Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)).$ file /tmp/raspi.gpg
/tmp/raspi.gpg: OpenPGP Public Key Version 4, Created Sun Apr 1 21:02:33 2012, RSA (Encrypt or Sign, 2048 bits); User ID; Signature; OpenPGP Certificate$ sudo apt-key del 90FDDD2E
Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)).
OK$ sudo mv /tmp/raspi.gpg /etc/apt/trusted.gpg.d/