yum update的时候遇到以下问题:

 yum                                               noarch                       3.4.3-168.el7.centos                                 base                          1.2 M
 yum-plugin-fastestmirror                          noarch                       1.1.31-54.el7_8                                      base                           34 k
 yum-utils                                         noarch                       1.1.31-54.el7_8                                      base                          122 k
Installing for dependencies:
 bind-export-libs                                  x86_64                       32:9.11.4-26.P2.el7_9.4                              updates                       1.1 M
 geoipupdate                                       x86_64                       2.5.0-1.el7                                          base                           35 k

Transaction Summary
=========================================================================================================================================================================
Install    6 Packages (+2 Dependent packages)
Upgrade  178 Packages

Total size: 356 M
Is this ok [y/d/N]: y
Downloading packages:
warning: /var/cache/yum/x86_64/7/jenkins/packages/jenkins-2.288-1.1.noarch.rpm: Header V4 RSA/SHA512 Signature, key ID 45f2c3d5: NOKEY

Public key for jenkins-2.288-1.1.noarch.rpm is not installed

解决方法如下,执行命令:

[root@izbp1i8jz ~]# wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins.io/redhat-stable/jenkins.repo
[root@izbp1i8jz ~]# rpm --import http://pkg.jenkins.io/redhat-stable/jenkins.io.key

控制台输出信息为:

[root@izbp1i8jz ~]# wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins.io/redhat-stable/jenkins.repo
--2021-04-20 11:24:49--  http://pkg.jenkins.io/redhat-stable/jenkins.repo
Resolving pkg.jenkins.io (pkg.jenkins.io)... 151.101.110.133, 2a04:4e42:1a::645
Connecting to pkg.jenkins.io (pkg.jenkins.io)|151.101.110.133|:80... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: https://pkg.jenkins.io/redhat-stable/jenkins.repo [following]
--2021-04-20 11:24:49--  https://pkg.jenkins.io/redhat-stable/jenkins.repo
Connecting to pkg.jenkins.io (pkg.jenkins.io)|151.101.110.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 85
Saving to:/etc/yum.repos.d/jenkins.repo’
100%[===============================================================================================================================>] 85          --.-K/s   in 0s      
2021-04-20 11:24:50 (3.62 MB/s) -/etc/yum.repos.d/jenkins.repo’ saved [85/85]

[root@izbp1i8jz ~]# rpm --import http://pkg.jenkins.io/redhat-stable/jenkins.io.key
[root@izbp1i8jz ~]#
[root@izbp1i8jz ~]#

再运行yum update更新就okay了

......
  tuned.noarch 0:2.11.0-11.el7_9                    tzdata.noarch 0:2021a-1.el7                                 vim-common.x86_64 2:7.4.629-8.el7_9                      
  vim-enhanced.x86_64 2:7.4.629-8.el7_9             vim-filesystem.x86_64 2:7.4.629-8.el7_9                     wpa_supplicant.x86_64 1:2.6-12.el7_9.2                   
  xfsprogs.x86_64 0:4.5.0-22.el7                    yum.noarch 0:3.4.3-168.el7.centos                           yum-plugin-fastestmirror.noarch 0:1.1.31-54.el7_8        
  yum-utils.noarch 0:1.1.31-54.el7_8               

Replaced:
  grub2.x86_64 1:2.02-0.65.el7.centos.2                                            grub2-tools.x86_64 1:2.02-0.65.el7.centos.2                                           

Complete!
Logo

权威|前沿|技术|干货|国内首个API全生命周期开发者社区

更多推荐