互联网

mysql 遇到 The following signatures were invalid: EXPKEYSIG B7B3B788A8D3785C MySQL Release Engineering 错误

mysql 遇到 EXPKEYSIG B7B3B788A8D3785C 错误的解决方案

2025.11.07 9 次浏览

这段时间,公司部署的多个VPS/云服务器(debian 系统) 在进行 apt update 的时候提示下面错误,


Err:4 http://repo.mysql.com/apt/debian bookworm InRelease

  The following signatures were invalid: EXPKEYSIG B7B3B788A8D3785C MySQL Release Engineering <mysql-build@oss.oracle.com>


部分VPS错误提示为:

The following signatures couldn't be verified because the public key is not available: NO_PUBKEY B7B3B788A8D3785C


解决方案:

1、编辑/etc/apt/sources.list.d/mysql.list 文件,去除 [signed-by=/usr/share/keyrings/mysql-apt-config.gpg] 字样

2、执行: 

gpg --keyserver keyserver.ubuntu.com --recv-keys B7B3B788A8D3785C 

3、更新gpg密钥到可信区

gpg --export --armor B7B3B788A8D3785C | tee /etc/apt/trusted.gpg.d/mysql.asc


完成上述操作后,可以顺利 apt update 和 upgrade.</mysql-build@oss.oracle.com>