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

2023-02-12,,,

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的验证没有通过

3.解决办法

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

yum install mysql-community-server --nogpgcheck

Mysql安装失败-GPG验证不通过或Failed to start mariadb.service: Unit not fou的相关教程结束。

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

下载本文的Word格式文档,以方便收藏与打印。