Debian12(bookworm)源配置文件修复缺少公钥问题

系统更新提示

W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: https://packages.sury.org/php  bookworm InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY B188E2B695BD4743
W: Failed to fetch https://packages.sury.org/php/dists/bookworm/InRelease   The following signatures couldn't be verified because the public key is not available: NO_PUBKEY B188E2B695BD4743
W: Some index files failed to download. They have been ignored, or old ones used instead.

解决办法

①使用 wget 下载并添加公钥

方法一

wget -qO - https://packages.sury.org/php/apt.gpg | tee -a /etc/apt/trusted.gpg.d/php.sury.org.gpg

方法二

wget -qO /etc/apt/trusted.gpg.d/sury-php.gpg https://packages.sury.org/php/apt.gpg

②从钥匙服务器获取公钥

apt-key adv --keyserver keyserver.ubuntu.com --recv-keys B188E2B695BD4743

③检查源配置文件

确保/etc/apt/sources.list.d/php.list 文件中的源配置正确无误。

deb [signed-by=/etc/apt/trusted.gpg.d/sury-php.gpg] https://packages.sury.org/php/ $(lsb_release -sc) main

0
0
文章导航
  • 将word文档中的英文和数字字体设置为新罗马
  • N: Repository 'http://mirrors.cloud.aliyuncs.com/debian bookworm InRelease' changed its 'Version' value from '12.5' to '12.6'
  • 上一篇将word文档中的英文和数字字体设置为新罗马
  • 下一篇N: Repository 'http://mirrors.cloud.aliyuncs.com/debian bookworm InRelease' changed its 'Version' value from '12.5' to '12.6'