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

2023-05-16

一、引言

        今天在安装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 only
 safe 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 working
        upstream. This is most often useful if you are using a newer
        distribution release than is supported by the repository (and the
        packages for the previous distribution release still work).

     3. Run the command with the repository temporarily disabled
            yum --disablerepo=openresty ...

     4. Disable the repository permanently, so yum won't use it by default. Yum
        will then just ignore the repository until you permanently enable it
        again or use --enablerepo for temporary usage:

            yum-config-manager --disable openresty
        or
            subscription-manager repos --disable=openresty

     5. 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 much
        slower). If it is a very temporary problem though, this is often a nice
        compromise:

            yum-config-manager --save --setopt=openresty.skip_if_unavailable=true

failure: 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 ~]# 

问题解决。

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

Centos7执行yum install *时出现“Peer‘s Certificate has expired.“ 的相关文章

  • 如何为 HTTPS 调用指定出站证书别名?

    我正在调用需要客户端证书身份验证的 Web 服务 如果我指定一个包含单个证书 服务期望的客户端证书 的 Java 密钥库 那么一切都会正常工作 但是 如果我使用包含多个证书的密钥库 那么我似乎无法指定客户端应选择哪个证书 客户端似乎会选择第
  • cURL 错误:SSL 对等证书或 SSH 远程密钥不正常 [关闭]

    这个问题不太可能对任何未来的访客有帮助 它只与一个较小的地理区域 一个特定的时间点或一个非常狭窄的情况相关 通常不适用于全世界的互联网受众 为了帮助使这个问题更广泛地适用 访问帮助中心 help reopen questions Using
  • iPhone客户端证书

    我想验证我正在编写的应用程序是否正在 iPhone 上运行 会是什么 完美之处在于 Apple 将 SSL 客户端证书嵌入到每台 iPhone 中 该证书可以由接收服务器进行身份验证 我是这种情况吗 我还没有开始研究这个 我会更新我发现的任
  • GNU shell 函数在意外标记“(”附近出现语法错误

    我想确定我的 makefile 中 Intel Fortran 编译器的版本 因此我添加了一些脚本GNU shell功能如下进行测试 VERIFORT shell ifort version VERIFORT shell ifort ver
  • 无法在 CentOS 7 上的 PHP 中打开 file_put_contents 上的流

    我知道这是许多线程的常见错误 但我厌倦了搜索 但仍然没有解决它 当我尝试运行该函数时文件放置内容我收到以下错误 Warning file put contents test txt failed to open stream Permiss
  • 无法将 HTTPS 与 ServerXMLHTTP 对象一起使用

    我支持通过 HTTPS 连接到支付网关的经典 ASP 应用程序 直到最近还没有出现任何问题 几天前 最新的更新安装在服务器 Windows Server 2003 上并导致网站崩溃 下面是一个代码片段 Dim oHttp Dim strRe
  • 禁用 yum 事务检查文件冲突

    如何禁用文件的 yum 事务检查 Transaction check error file usr local xenco backend current from install of xenco rr 1 9 6 104 x86 64
  • 以编程方式将证书安装到 Mozilla 中

    有没有办法以编程方式将证书安装到 mozilla 中 我们正在尝试编写所有内容的脚本来消除环境偏差 因此通过 mozilla 首选项手动安装它无法满足我们的需求 我认为有一种方法可以使用 certutil 来做到这一点 但我不确定 Mozi
  • PushSharp 不识别 APN 生产证书

    我开发了一个 iOS 应用程序 可以接收推送通知 我使用 PushSharp 从 NET 环境发送它们 开发过程中一切都很顺利 推送已成功发送 var push new PushBroker var appleCert File ReadA
  • 通配符证书对 mydomain.com 无效

    我创建了通配符证书来支持我的网站域和子域 新证书适用于我的子域 例如 www mydomain com sub mydomain com 但是当我尝试访问 mydomain com 时 我收到证书警告 该证书仅对 mydomain com
  • Apple 推送通知服务:证书安装服务器端?

    我已按照以下说明进行操作如何构建 Apple 推送通知提供程序服务器 教程 http blog boxedice com 2009 07 10 how to build an apple push notification provider
  • Azure VPN 错误找不到可与此可扩展身份验证协议一起使用的证书。 (错误798)

    我正在 Azure 中创建 VPN 并在以下位置创建自签名证书 本地计算机 个人 证书 颁发给 FQDN 名称是证书的名称 受信任的根证书颁发机构 证书 从个人手动复制 我已经在 Azure 中配置了 VPN 并且已下载并解压该 VPN 并
  • 使用 Adob​​e Air 证书签署 Android Native apk

    我需要帮助使用为 Adob e Air 生成的现有 p12 证书来签署 Android 本机应用程序 几年前 应用程序在 Adob e Air 中完成 签名并发布到 Google Play 现在 当从 Adob e Air 迁移到 Andr
  • 如何解决发布 .NET Core 时出现的 PFX 签名不支持错误

    我一直在尝试使用 PFX 文件对程序集进行签名 一切正常 我在 Visual Studio 中访问了属性 签名 但每当我运行点网发布命令 我收到此错误 C Program Files dotnet sdk 2 1 201 Microsoft
  • 如何在 Amazon Linux 上安装最新版本的 GDAL?

    我想安装GDAL https gdal org 在运行 Amazon Linux 的 EC2 实例上 我认为它基于 RHEL 6 如果可能的话 我想避免从源代码编译 EPEL Yum 存储库中包含的 GDAL 版本对于我的目的来说太旧了 g
  • 如何链接 SSL 证书

    有没有什么方法可以将我们自己生成的密钥对与已链接到根 CA 例如 verisign 的现有证书链接起来 基本上我的问题如下图所示 Verisign Root CA gt Company XYZ certificate gt Server f
  • Dart 将客户端 Socket 升级为 WebSocket

    Since WebSocket https api dartlang org stable 2 1 0 dart io WebSocket class html在 Dart 中不允许直接设置安全上下文 https api dartlang
  • Android SSL 无对等证书

    我有一个例外 没有同行证书 当我询问谷歌时 我得到了解决方案 我信任所有证书 但这个问题的答案是 它是不安全的 所以我给班级打电话 HostnameVerifier hostnameVerifier org apache http conn
  • 如何使用Python中字符串变量中存储的证书打开ssl套接字

    在Python中 ssl wrap socket可以从文件中读取证书 ssl wrap socket需要证书作为文件路径 如何使用从字符串变量读取的证书启动 SSL 连接 我的主机环境不允许写入文件 并且临时文件模块不起作用我正在使用Pyt
  • 如何在CentOS7中更改docker守护进程根目录

    我在 CentOS7 上运行 docker 我想更改我的基本目录 var lib docker to data docker I found this https docs docker com engine reference comma

随机推荐

  • 深入理解 http 反向代理(nginx)

    要理解什么是 反向代理 reverse proxy 自然你得先知道什么是 正向代理 forward proxy 另外需要说的是 一般提到反向代理 通常是指 http 反向代理 但反向代理的范围可以更大 比如 tcp 反向代理 在这里 不打算
  • 01-【Royal TSX】Mac上最好用的SSH工具Royal TSX使用教程

    参考文章 xff1a https www jianshu com p 0206980f529e
  • 数据结构:线性结构(C语言)

    文章目录 线性结构线性表什么是线性表线性表的抽象类型描述线性表的实现 广义表广义表定义多重链表 堆栈什么是堆栈堆栈的抽象数据类型描述堆栈的顺序存储实现堆栈的链式存储实现堆栈的应用 队列什么是队列队列的抽象数据类型描述队列的顺序存储实现队列的
  • 树(C语言)

    文章目录 树树的定义树的一些基本术语树的表示 树 树的定义 树 xff08 Tree xff09 xff1a n n 0
  • 堆(C语言)

    文章目录 堆 heap 什么是堆最小堆的操作操作集的实现 C语言 堆 heap 什么是堆 定义 堆 heap 是计算机科学中一类特殊的数据结构的统称 堆通常是一个可以被看做一棵树的数组对象 性质 结构性 xff1a 用数组表示的完全二叉树
  • VS2017中fopen等函数报错解决方法

    文章目录 VS2017中fopen 函数报错解决方法问题解决方法 VS2017中fopen 函数报错解决方法 问题 用VS2017写C语言代码的时候 xff0c 代码中使用了fopen 函数 xff0c 调试之后报错如下 xff1a err
  • 定位,浮动,BFC

    文章目录 1 xff0c 定位1 margin 与 padding 区别 xff1a 2 定位 xff1a 2 xff0c 元素分类 xff0c 浮动 xff0c BFC1 1 常见块级元素 xff1a 1 2 常见行内元素 xff1a 1
  • 表排序

    文章目录 表排序 表排序 思想 当待排数组中的元素不是简简单单的整数 xff0c 而是复杂的结构体 xff0c 那么移动元素所花费的时间就不能忽略不计了 xff0c 这时候我们要减少元素之间移动的次数了 表排序就是这么一个排序 xff0c
  • 循环链表的实现

    循环链表的实现 说明 参考资料 传智播客扫地僧的数据结构教学视频 线性表基本知识 参考 该实现的说明 C语言实现基于单向链表 xff0c 参考实现算法和数据的分离 实现 circular list h span class token ma
  • Ubuntu20.04安装与配置记录

    Ubuntu20 04安装与配置记录 原文地址 xff1a Ubuntu20 04安装与配置记录 一 Ubuntu系统盘制作 1 1 Windows环境下制作系统盘 下载Ubuntu系统 xff0c 选择桌面版 下载工具系统盘制作工具Ruf
  • C++单例写法记录

    C 43 43 单例写法记录 源码地址 一 饿汉式 1 1 静态指针 静态垃圾回收类 instance h ifndef INSTANCE H define INSTANCE H include lt string gt include l
  • 堆栈应用:表达式求值(C语言)

    文章目录 堆栈应用 xff1a 表达式求值 xff08 C语言 xff09 两个定义大致过程具体代码 堆栈应用 xff1a 表达式求值 xff08 C语言 xff09 两个定义 中缀表达式 xff1a 运算符号位于两个运算数之间 如 xff
  • andrsoid studio 长期编辑

    andrsoid studio 2020 02 08 修改build gradle配置 Top level build file where you can add configuration options common to all s
  • 使用 Maven 搭建 Mybatis 环境

    一 创建项目 1 点击 File gt New gt Module 2 选择左侧的 Maven xff0c 由于只是创建一个普通的项目 xff0c 此处点击 Next 即可 3 输入 GroupId 和 ArtifactId 4 配置 ma
  • ubuntu安装npm命令

    ubuntu安装npm命令 摘要 xff1a npm全称Node Package Manager xff0c 是node的包管理工具 xff0c 是用JavaScript写出来的工具 xff0c 被内置进了node中 xff0c 是随同No
  • zynq操作系统: Linux驱动开发AXIDMA篇

    前言 由于bram形式的速率限制 xff0c 在同样紧急的时间条件下 xff0c 还是改回了axidma的方式来降维打击 xff0c 对于几兆的速率 xff0c 颇有种杀鸡用牛刀的感觉 xff0c 没办法 xff0c 原来的刀就是差一点 x
  • C# 对RabbitMQ使用

    1 安装NuGet包RabbitMQ Client 2 生产者 确认机制 1 含义 xff1a 就是应答模式 xff0c 生产者发送一条消息之后 xff0c Rabbitmq服务器做了个响应 xff0c 表示收到了 2 特点 xff1a 异
  • CSS—— grid 网格布局

    文章目录 1 grid 网格布局 1 grid 网格布局 display gridgrid 属性是以下属性的简写属性 默认 grid gap xff0c none xff0c 200px 网格之间的距离grid template rows
  • 【图文解析】给定一个链表,判断链表中是否有环

    目录 例题描述解题思路代码实现 例题描述 给定一个链表 xff0c 判断链表中是否有环 为了表示给定链表中的环 xff0c 我们使用整数 pos 来表示链表尾连接到链表中的位置 xff08 索引从 0 开始 xff09 如果 pos 是 1
  • Centos7执行yum install *时出现“Peer‘s Certificate has expired.“

    一 引言 今天在安装OpenResty的时候 xff0c 出现了 34 Peer 39 s Certificate has expired 34 的问题 xff0c 详细错误如下 xff1a root 64 kubernetes sudo