場景:
安裝mysql8的時候,之前沒遇到這個問題,這次突然遇到新的問題(可能是之前裝了mysql5.7?):The GPG keys listed for the "MySQL 8.0 Community Server" repository are already installed but they are not correct for this package.
解決:
1.可以先嘗試這個:
sudo rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY*
然后在yum install mysql-community-server
2.不行的話,可以用這個:
sudo yum -y install * --nogpgcheck
GPG keys是安裝包發布時生成的密鑰,安裝是需要核對密鑰來確保安全性
參考:
https://www.cnblogs.com/gaohongyu/p/14479497.html