rockylinux9安装软件报错

发布于:2024-10-09 ⋅ 阅读:(10) ⋅ 点赞:(0)

1、rocky linux9再安装软件的时候报错:

[root@Client119 yum.repos.d]# yum -y install epel-release
[root@Client119 yum.repos.d]# yum -y install libcgroup
Extra Packages for Enterprise Linux 9 - x86_64                                                                                              0.0  B/s |   0  B     00:05    
Errors during downloading metadata for repository 'epel':
  - Curl error (60): SSL peer certificate or SSH remote key was not OK for https://mirrors.fedoraproject.org/metalink?repo=epel-9&arch=x86_64&infra=$infra&content=pub/rocky [SSL certificate problem: certificate is not yet valid]
Error: Failed to download metadata for repo 'epel': Cannot prepare internal mirrorlist: Curl error (60): SSL peer certificate or SSH remote key was not OK for https://mirrors.fedoraproject.org/metalink?repo=epel-9&arch=x86_64&infra=$infra&content=pub/rocky [SSL certificate problem: certificate is not yet valid]

在这里插入图片描述2、问题原因:大概是时间同步的问题(我在虚拟机里面恢复快照过去,时间停留在了当时快照拍摄的时间)、应该是系统无法连接到 EPEL 存储库。这是由于证书问题造成的,该问题可能是由系统时钟不正确引起的。
3、配置时间同步:

[root@Client119 yum.repos.d]# vim /etc/chrony.conf 
pool ntp1.aliyun.com iburst
pool ntp2.aliyun.com iburst
pool ntp3.aliyun.com iburst
pool ntp4.aliyun.com iburst
pool ntp5.aliyun.com iburst
pool ntp6.aliyun.com iburst

在这里插入图片描述

[root@Client119 yum.repos.d]# chronyc sources -v

  .-- Source mode  '^' = server, '=' = peer, '#' = local clock.
 / .- Source state '*' = current best, '+' = combined, '-' = not combined,
| /             'x' = may be in error, '~' = too variable, '?' = unusable.
||                                                 .- xxxx [ yyyy ] +/- zzzz
||      Reachability register (octal) -.           |  xxxx = adjusted offset,
||      Log2(Polling interval) --.      |          |  yyyy = measured offset,
||                                \     |          |  zzzz = estimated error.
||                                 |    |           \
MS Name/IP address         Stratum Poll Reach LastRx Last sample               
===============================================================================
^? 120.25.115.20                 2   8   200   552    -15ms[-2815us] +/-   46ms
^* 203.107.6.88                  2   6   377    33  -4046us[-6196us] +/-   31ms
[root@Client119 yum.repos.d]# date
Sat Oct  5 04:39:41 PM CST 2024
[root@Client119 yum.repos.d]#