php 安装mysql-community-server时出现GPG密钥问题

rjee0c15  于 2022-10-30  发布在  PHP
关注(0)|答案(5)|浏览(280)

安装mysql-community-server时出现以下错误:

命令:

sudo yum install mysql-community-server

错误:

warning: /var/cache/yum/x86_64/2/mysql57-community/packages/mysql-community-libs-compat-5.7.37-1.el7.x86_64.rpm: Header V4 RSA/SHA256 Signature, key ID 3a79bd29: NOKEY
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql

The GPG keys listed for the "MySQL 5.7 Community Server" repository are already installed but they are not correct for this package.
Check that the correct key URLs are configured for this repository.

 Failing package is: mysql-community-libs-compat-5.7.37-1.el7.x86_64
 GPG Keys are configured as: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql

有谁能帮上忙吗...

bvn4nwqk

bvn4nwqk1#

您可以使用下列其中一项。
对于基于rpm的安装:

rpm --import https://repo.mysql.com/RPM-GPG-KEY-mysql-2022

基于Apt:

wget -q -O - https://repo.mysql.com/RPM-GPG-KEY-mysql-2022 | apt-key add -
dba5bblo

dba5bblo2#

发件人:https://dev.mysql.com/doc/refman/8.0/en/checking-rpm-signature.html
没有单独的签名。RPM软件包有一个内置的GPG签名和MD5校验和。
rpm还支持直接从URL加载密钥:

rpm --import https://repo.mysql.com/RPM-GPG-KEY-mysql-2022
ippsafx7

ippsafx73#

新版本的GPG密钥已更改。请参阅以下内容以获取更多信息:https://support.cpanel.net/hc/en-us/articles/4419382481815?input_string=gpg+keys+problem+with+mysql+5.7
解决此错误的步骤需要安装更新的MySQL GPG。
1.对于现有系统,/etc/yum.repos.d/中的MySQL存储库文件需要将其“gpgkey”行调整为:
请输入您的repo.mysql.com/RPM-GPG-KEY-mysql-2022
调整后,再次运行更新:

/usr/local/cpanel/scripts/upcp

1.对于新安装,您可以在运行安装程序之前导入密钥:
rpm --导入https://repo.mysql.com/RPM-GPG-KEY-mysql-2022
乌班图:

wget -q -O https://repo.mysql.com/RPM-GPG-KEY-mysql-2022 | apt-key add -
o8x7eapl

o8x7eapl4#

我在两台仅限DNS的服务器上遇到了同样的问题。
我编辑了/etd/yum.repos.d/Mysql57.repo文件,并将所有“gpgcheck=1”行更改为“gpgcheck=0”
然后我执行了yum update
然后我编辑了/etd/yum.repos.d/Mysql57.repo文件,并将所有“gpgcheck=0”行改回“gpgcheck=1”
最后,我更新了cPanel软件。

2ic8powd

2ic8powd5#

这解决了我在Debian 11:

wget --quiet --output-document - https://repo.mysql.com/RPM-GPG-KEY-mysql-2022 | gpg --no-default-keyring --keyring gnupg-ring:/etc/apt/trusted.gpg.d/mysql2022.gpg --import
chmod 644 /etc/apt/trusted.gpg.d/mysql2022.gpg

在此之前,apt-get update报告了键错误,之后一切正常。

相关问题