文章目录

原因:使用以下命令总是失败

yum makecache

CentOS-8 - Base 0.0 B/s | 0 B 00:00
Failed to download metadata for repo 'base'
Error: Failed to download metadata for repo 'base'

解决过程:

使用yum调试过程
yum -d 10 makecache

发现报错如下:
error: Curl error (60): Peer certificate cannot be authenticated with given CA certificates for https://mirrors.xxx.com.cn/centos/8/BaseOS/x86_64/os/repodata/repomd.xml

原来是cur错误,直接使用curl发现
# curl https://mirrors.xxx.com.cn/centos/8/BaseOS/x86_64/os/repodata/repomd.xml
curl: (60) SSL certificate problem: EE certificate key too weak

解决办法

  • 事实证明这是一件好事,因为它是系统杀死旧密码。要让Centos8 接受旧协议,只需一个简单的命令并重新启动:
  • 即:解决问题
$ update-crypto-policies --show
默认
# update-crypto-policies --set LEGACY
将系统策略设置为 LEGACY
  • 参考:https://gregsowell.com/?p=6424