一、引言

今天在安装OpenResty的时候,出现了"Peer's Certificate has expired."的问题,详细错误如下:

[root@kubernetes ~]# sudo mv openresty.repo /etc/yum.repos.d/
[root@kubernetes ~]# sudo yum check-update
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile* epel: mirror.sjtu.edu.cn
https://openresty.org/package/centos/7/x86_64/repodata/repomd.xml: [Errno 14] curl#60 - "Peer's Certificate has expired."
Trying other mirror.
It was impossible to connect to the CentOS servers.
This could mean a connectivity issue in your environment, such as the requirement to configure a proxy,
or a transparent proxy that tampers with TLS security, or an incorrect system clock.
You can try to solve this issue by using the instructions on https://wiki.centos.org/yum-errors
If above article doesn't help to resolve this issue please use https://bugs.centos.org/.One of the configured repositories failed (Official OpenResty Open Source Repository for CentOS),and yum doesn't have enough cached data to continue. At this point the onlysafe thing yum can do is fail. There are a few ways to work "fix" this:1. Contact the upstream for the repository and get them to fix the problem.2. Reconfigure the baseurl/etc. for the repository, to point to a workingupstream. This is most often useful if you are using a newerdistribution release than is supported by the repository (and thepackages for the previous distribution release still work).3. Run the command with the repository temporarily disabledyum --disablerepo=openresty ...4. Disable the repository permanently, so yum won't use it by default. Yumwill then just ignore the repository until you permanently enable itagain or use --enablerepo for temporary usage:yum-config-manager --disable openrestyorsubscription-manager repos --disable=openresty5. Configure the failing repository to be skipped, if it is unavailable.Note that yum will try to contact the repo. when it runs most commands,so will have to try and fail each time (and thus. yum will be be muchslower). If it is a very temporary problem though, this is often a nicecompromise:yum-config-manager --save --setopt=openresty.skip_if_unavailable=truefailure: repodata/repomd.xml from openresty: [Errno 256] No more mirrors to try.
https://openresty.org/package/centos/7/x86_64/repodata/repomd.xml: [Errno 14] curl#60 - "Peer's Certificate has expired."

二、问题分析

通过在网上查询资料,得知可能是系统时间的问题;于是就查询了一下当前系统的时间,果然是时间对不上的问题:

[root@kubernetes ~]# date
Wed Aug 18 06:06:36 CST 2021

三、问题解决

1、安装 ntpdate。

[root@kubernetes ~]# yum install -y ntp

2、同步系统时间。

[root@kubernetes ~]# ntpdate time.apple.com
21 Nov 10:23:51 ntpdate[83378]: step time server 17.253.114.253 offset 8223337.126582 sec

3、再次执行安装。

[root@kubernetes ~]# sudo yum check-update
Loaded plugins: fastestmirror
Determining fastest mirrors
epel/x86_64/metalink                                                                                                                                                                                   | 7.8 kB  00:00:00     * epel: mirror.sjtu.edu.cn
base                                                                                                                                                                                                   | 3.6 kB  00:00:00
extras                                                                                                                                                                                                 | 2.9 kB  00:00:00
openresty                                                                                                                                                                                              | 2.9 kB  00:00:00
updates                                                                                                                                                                                                | 2.9 kB  00:00:00
openresty/7/x86_64/primary_db                                                                                                                                                                          |  49 kB  00:00:00     bind-export-libs.x86_64                                                                                     32:9.11.4-26.P2.el7_9.7                                                                                    updates
bind-libs-lite.x86_64                                                                                       32:9.11.4-26.P2.el7_9.7                                                                                    updates
bind-license.noarch                                                                                         32:9.11.4-26.P2.el7_9.7                                                                                    updates
binutils.x86_64                                                                                             2.27-44.base.el7_9.1                                                                                       updates
ca-certificates.noarch                                                                                      2021.2.50-72.el7_9                                                                                         updates
epel-release.noarch                                                                                         7-14                                                                                                       epel
glibc.i686                                                                                                  2.17-325.el7_9                                                                                             updates
glibc.x86_64                                                                                                2.17-325.el7_9                                                                                             updates
glibc-common.x86_64                                                                                         2.17-325.el7_9                                                                                             updates
grub2.x86_64                                                                                                1:2.02-0.87.el7.centos.7                                                                                   updates
grub2-common.noarch                                                                                         1:2.02-0.87.el7.centos.7                                                                                   updates
grub2-pc.x86_64                                                                                             1:2.02-0.87.el7.centos.7                                                                                   updates
grub2-pc-modules.noarch                                                                                     1:2.02-0.87.el7.centos.7                                                                                   updates
grub2-tools.x86_64                                                                                          1:2.02-0.87.el7.centos.7                                                                                   updates
grub2-tools-extra.x86_64                                                                                    1:2.02-0.87.el7.centos.7                                                                                   updates
grub2-tools-minimal.x86_64                                                                                  1:2.02-0.87.el7.centos.7                                                                                   updates
kernel.x86_64                                                                                               3.10.0-1160.45.1.el7                                                                                       updates
kernel-tools.x86_64                                                                                         3.10.0-1160.45.1.el7                                                                                       updates
kernel-tools-libs.x86_64                                                                                    3.10.0-1160.45.1.el7                                                                                       updates
kpartx.x86_64                                                                                               0.4.9-135.el7_9                                                                                            updates
libxml2.x86_64                                                                                              2.9.1-6.el7_9.6                                                                                            updates
libxml2-python.x86_64                                                                                       2.9.1-6.el7_9.6                                                                                            updates
nspr.x86_64                                                                                                 4.32.0-1.el7_9                                                                                             updates
nss.x86_64                                                                                                  3.67.0-3.el7_9                                                                                             updates
nss-softokn.x86_64                                                                                          3.67.0-3.el7_9                                                                                             updates
nss-softokn-freebl.i686                                                                                     3.67.0-3.el7_9                                                                                             updates
nss-softokn-freebl.x86_64                                                                                   3.67.0-3.el7_9                                                                                             updates
nss-sysinit.x86_64                                                                                          3.67.0-3.el7_9                                                                                             updates
nss-tools.x86_64                                                                                            3.67.0-3.el7_9                                                                                             updates
nss-util.x86_64                                                                                             3.67.0-1.el7_9                                                                                             updates
openldap.x86_64                                                                                             2.4.44-24.el7_9                                                                                            updates
openssl.x86_64                                                                                              1:1.0.2k-22.el7_9                                                                                          updates
openssl-libs.x86_64                                                                                         1:1.0.2k-22.el7_9                                                                                          updates
pigz.x86_64                                                                                                 2.3.4-1.el7                                                                                                epel
python-perf.x86_64                                                                                          3.10.0-1160.45.1.el7                                                                                       updates
rpm.x86_64                                                                                                  4.11.3-46.el7_9                                                                                            updates
rpm-build-libs.x86_64                                                                                       4.11.3-46.el7_9                                                                                            updates
rpm-libs.x86_64                                                                                             4.11.3-46.el7_9                                                                                            updates
rpm-python.x86_64                                                                                           4.11.3-46.el7_9                                                                                            updates
sudo.x86_64                                                                                                 1.8.23-10.el7_9.2                                                                                          updates
tzdata.noarch                                                                                               2021e-1.el7                                                                                                updates
virt-what.x86_64                                                                                            1.18-4.el7_9.1                                                                                             updates
[root@kubernetes ~]#

问题解决。

Centos7执行yum install *时出现“Peer‘s Certificate has expired.“相关推荐

  1. 阿里云yum源报错Peer’s Certificate has expired原因及解决

    问题描述: 从阿里云yum下载docker.repo到本地 yum-config-manager \ --add-repo http://mirrors.aliyun.com/docker-ce/li ...

  2. CentOS7执行yum命令出错

    在CentOS7执行安装命令时,比如yum update等,会出现下面的报错. Loaded plugins: fastestmirror Error: invalid clean argument: ...

  3. 阿里云Centos8.2执行 yum install -y yum-utils 报错问题解决

    目录 问题描述: 阿里云部署docker 执行yum install -y yum-utils报错 1,进入配置文件目录 2,删除所有的.repo源文件 3,下载可用的.repo文件 4,运行 yum ...

  4. CentOS6在使用yum install 时提示镜像源路径不存在:PYCURL ERROR 22 - “The requested URL returned error: 404 Not Found

    场景 CentOS6.9的版本在使用 yum install gcc-c++ 安装C和C++的插件时提示: PYCURL ERROR 22 - "The requested URL retu ...

  5. CentOS6.9中使用yum install时提示:Cannot find a valid baseurl for repo: centos-sclo-rh

    场景 CentOS的版本为6.9,在使用yum install 安装相关依赖时提示: Cannot find a valid baseurl for repo: centos-sclo-rh 注: 博 ...

  6. yum install时提示This system is not registered with an entitlement server

    This system is not registered with an entitlement server 1.Uninstall yum package 2.Yum Repo 在一秒钟内看到本 ...

  7. Centos7下安装yum install net-tools一些常见问题

    执行 yum install net-tools 一定要注意空格 注意空格 注意空格 ,重要的事请说三遍,不然就会出现错误如下: No such command:install-tools 出现lin ...

  8. CentOS7使用yum安装Nginx

    CentOS7使用yum安装Nginx 文章目录 CentOS7使用yum安装Nginx 安装说明 安装gcc 安装pcre库 安装zlib库 安装OpenSSL库 安装Nginx库 启动nginx ...

  9. Centos7下yum安装GlusterFS方法

    GlusterFS GlusterFS是一款分布式文件系统,能支持的clinet数很多,并能很好的管理各个节点.下面是两台master,一个client的安装方法 工具/原料 GlusterFS Ce ...

最新文章

  1. SCRUM敏捷实践—任务看板
  2. 4、Power View—卡的应用
  3. linux 内存显示括号内字母的含义
  4. Node.js实践第一天
  5. Android实现笔记本修改功能,安卓12第二个开发者预览版推出:UI、功能有所改进...
  6. 循序渐进db2 第3版_「图书推荐」焊接工程师手册第3版
  7. 【LeetCode】【HOT】3. 无重复字符的最长子串(哈希表)
  8. SQLite 3 中的数据类型
  9. T-SQL: 17 个与日期时间相关的自定义函数(UDF),周日作为周的最后一天,均不受 @@DateFirst、语言版本影响!...
  10. 《统一沟通-微软-实战》-6-部署-7-部署移动功能-2
  11. Tensorflow:安装和配置
  12. 华为内部流程管理系统(附关键流程图)
  13. html浮动提示框,JavaScript浮动提示框Tooltip效果
  14. 苹果雪豹操作系统正式版_苹果为旧机型发布iOS 12.4.2;macOS 10.14.6发布了,Catalina还远吗?...
  15. Only fullscreen opaque activities can request orientation比较完美的解决方法,黑白屏问题解决
  16. ELK日志分析平台之kibana以及借助ELK平台实现网站访问量统计
  17. 拐道交叉的css3动画,CSS3图片翻转动画技术详解
  18. 如何在小米9 se(安卓9)安装Xposed框架?
  19. 装X利器:做一个Python爬虫小工具——图片下载器
  20. ORACLE-SQL编写规范(详细解释)

热门文章

  1. 【玩单反】什么是BKT按钮
  2. 项目管理专业人员能力评价(CSPM)好考吗?考试时间什么时候?
  3. oppoJava面试!搭建kafka集群
  4. OTA在线升级Android7.1系统迅为IMX6Q开发板支持SATA,PCIE,EIM总线,WIFI蓝牙
  5. 推荐系统-经典协同过滤理论基础实践
  6. 天行数据图文类免费API接口列表
  7. python项目方案书模板格式_GitHub - petterobam/python_tpl: Python项目规范模板
  8. substance painter 2018 mac中文永久破解教程
  9. 【GPRS模组】 安信可A9G 基于OpenCPU的SDK二次开发
  10. python 数据分析性能优化,双层for循环优化为单个for循环