报错信息
Error:Problem: cannot install the best candidate for the job- nothing provides libcrypto.so.10()(64bit) needed by mysql-community-server-8.0.36-1.el7.x86_64 from mysql80-community- nothing provides libssl.so.10()(64bit) needed by mysql-community-server-8.0.36-1.el7.x86_64 from mysql80-community- nothing provides libcrypto.so.10(libcrypto.so.10)(64bit) needed by mysql-community-server-8.0.36-1.el7.x86_64 from mysql80-community- nothing provides libssl.so.10(libssl.so.10)(64bit) needed by mysql-community-server-8.0.36-1.el7.x86_64 from mysql80-community- nothing provides libcrypto.so.10(OPENSSL_1.0.2)(64bit) needed by mysql-community-server-8.0.36-1.el7.x86_64 from mysql80-community
解决方法
wget http://mirror.centos.org/centos/8-stream/AppStream/x86_64/os/Packages/compat-openssl10-1.0.2o-4.el8.x86_64.rpmrpm -ivh mysql80-community-release-el7-7.noarch.rpm
报错信息
Import of key(s) didn't help, wrong key(s)?
Public key for mysql-community-client-8.0.36-1.el7.x86_64.rpm is not installed. Failing package is: mysql-community-clie nt-8.0.36-1.el7.x86_64GPG Keys are configured as: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql-2022, file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql
Public key for mysql-community-client-plugins-8.0.36-1.el7.x86_64.rpm is not installed. Failing package is: mysql-commun ity-client-plugins-8.0.36-1.el7.x86_64GPG Keys are configured as: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql-2022, file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql
Public key for mysql-community-common-8.0.36-1.el7.x86_64.rpm is not installed. Failing package is: mysql-community-comm on-8.0.36-1.el7.x86_64GPG Keys are configured as: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql-2022, file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql
Public key for mysql-community-icu-data-files-8.0.36-1.el7.x86_64.rpm is not installed. Failing package is: mysql-commun ity-icu-data-files-8.0.36-1.el7.x86_64GPG Keys are configured as: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql-2022, file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql
Public key for mysql-community-libs-8.0.36-1.el7.x86_64.rpm is not installed. Failing package is: mysql-community-libs-8 .0.36-1.el7.x86_64GPG Keys are configured as: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql-2022, file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql
Public key for mysql-community-server-8.0.36-1.el7.x86_64.rpm is not installed. Failing package is: mysql-community-serv er-8.0.36-1.el7.x86_64GPG Keys are configured as: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql-2022, 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
解决方法
去官网下载最新的GPG-KEY即可 ,记得文件的存放路径/etc/pki/rp-gpg/下
MySQL官方仓库:https://repo.mysql.com/
wget https://repo.mysql.com/RPM-GPG-KEY-mysql
wget https://repo.mysql.com/RPM-GPG-KEY-mysql-2023
但是有意思的是上面这个报错解决了,但是又出现了一个新的error,意思就是找不到file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql-2022这个文件了,对于这个error我这里是将之前下载的RPM-GPG-KEY-mysql-2023改名为RPM-GPG-KEY-mysql-2022即可解决这个问题,改名的话就不介绍了,毕竟这么简单不会有人还不会吧!
Curl error (37): Couldn't read a file:// file for file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql-2022 [Couldn't open file /etc/pki/rpm-gpg/RPM-GPG-KEY-mysql-2022]
The downloaded packages were saved in cache until the next successful transaction.
You can remove cached packages by executing 'yum clean packages'.