apt-get update 警告Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg)
apt-get update
出现问题
找到警告相关源的key
apt-key list
列出所有 keyring 的信息, 然后找出该 keyring 的 fingerprint
接下来导出相应key到指定目录
导出命令中只需要fingerprint的末尾 8 位
像是这样
sudo apt-get export 437D05B5 | sudo gpg --dearmour -o /etc/apt/trusted.gpg.d/f0.gpg
sudo apt-key export 437D05B5 | sudo gpg --dearmour -o /etc/apt/trusted.gpg.d/f1.gpg
sudo apt-key export C0B21F32 | sudo gpg --dearmour -o /etc/apt/trusted.gpg.d/f2.gpg
修改后
修改指定加载key的路径
修改: etc/apt/sources.list.d/***.list
修改后:
再次 sudo apt update, 无警告
参考:
https://www.jianshu.com/p/a239a9f969fe
https://xieshaohu.wordpress.com/category/linux/ubuntu/
https://blog.csdn.net/weixin_40599145/article/details/127627480
本文来自博客园,作者:泥烟,CSDN同名, 转载请注明原文链接:https://www.cnblogs.com/Knight02/p/17023831.html