Mysql安装失败-GPG验证不通过或Failed to start mariadb.service: Unit not fou

1.报错原因

报错原文

Key imported successfully

Import of key(s) didn't help, wrong key(s)?

Public key for mysql-community-client-5.7.37-1.el7.x86_64.rpm is not installed. Failing package is: mysql-community-client-5.7.37-1.el7.x86_64

GPG Keys are configured as: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql

Public key for mysql-community-common-5.7.37-1.el7.x86_64.rpm is not installed. Failing package is: mysql-community-common-5.7.37-1.el7.x86_64

GPG Keys are configured as: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql

Public key for mysql-community-libs-5.7.37-1.el7.x86_64.rpm is not installed. Failing package is: mysql-community-libs-5.7.37-1.el7.x86_64

GPG Keys are configured as: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql

Public key for mysql-community-server-5.7.37-1.el7.x86_64.rpm is not installed. Failing package is: mysql-community-server-5.7.37-1.el7.x86_64

GPG Keys are configured as: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql

The downloaded packages were saved in cache until the next successful transaction.

You can remove cached packages by executing 'yum clean packages'.

Error: GPG check FAILED

2.失败原因

GPG对于包的源key的验证没有通过
image

3.解决办法

在yum install 版本后面加上 --nogpgcheck,即可绕过GPG验证成功安装。比如

yum install mysql-community-server --nogpgcheck 
posted @ 2022-05-01 23:56  AlexEvans  阅读(1078)  评论(0编辑  收藏  举报