CentOS 7安装zabbix-agent 5.0报错:依赖检测失败:libpcre.so.0()(64bit)/获取GPG密钥失败解决

27 篇文章 0 订阅
6 篇文章 2 订阅

报错信息:

[root@localhost ~]# wget https://mirrors.tuna.tsinghua.edu.cn/zabbix/zabbix/5.0/rhel/6/x86_64/zabbix-agent-5.0.0-1.el6.x86_64.rpm
[root@localhost ~]# rpm -ivh zabbix-agent-5.0.0-1.el6.x86_64.rpm
警告:zabbix-agent-5.0.0-1.el6.x86_64.rpm: 头V4 RSA/SHA512 Signature, 密钥 ID a14fe591: NOKEY
错误:依赖检测失败:
        libpcre.so.0()(64bit) 被 zabbix-agent-5.0.0-1.el6.x86_64 需要

解决方法:

使用Zabbix 5.0 Yum源文件安装zabbix-agent 5.0软件,并且将gpgcheck=1修改为gpgcheck=0,防止出现“获取GPG密钥失败”报错。

安装Zabbix Yum源仓库

[root@localhost ~]# rpm -Uvh https://repo.zabbix.com/zabbix/5.0/rhel/7/x86_64/zabbix-release-5.0-1.el7.noarch.rpm

[root@localhost ~]# yum clean all

修改Zabbix 5.0 Yum源配置文件:

[root@localhost ~]# vim /etc/yum.repos.d/zabbix.repo
[zabbix]
name=Zabbix Official Repository - $basearch
baseurl=http://repo.zabbix.com/zabbix/5.0/rhel/7/$basearch/
enabled=1
gpgcheck=0          //修改gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX-A14FE591

[zabbix-frontend]
name=Zabbix Official Repository frontend - $basearch
baseurl=http://repo.zabbix.com/zabbix/5.0/rhel/7/$basearch/frontend
enabled=1
gpgcheck=0        //修改gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX-A14FE591

[zabbix-debuginfo]
name=Zabbix Official Repository debuginfo - $basearch
baseurl=http://repo.zabbix.com/zabbix/5.0/rhel/7/$basearch/debuginfo/
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX-A14FE591
gpgcheck=0        //修改gpgcheck=0

[zabbix-non-supported]
name=Zabbix Official Repository non-supported - $basearch
baseurl=http://repo.zabbix.com/non-supported/rhel/7/$basearch/
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX
gpgcheck=0        //修改gpgcheck=0

[root@localhost ~]# yum -y install zabbix-agent     //安装zabbix-agent 5.0软件
已加载插件:fastestmirror
Repository base is listed more than once in the configuration
Repository updates is listed more than once in the configuration
Repository extras is listed more than once in the configuration
Loading mirror speeds from cached hostfile
 * epel: mirrors.yun-idc.com
zabbix                                                                                        | 2.9 kB  00:00:00
zabbix-frontend                                                                               | 2.9 kB  00:00:00
zabbix-non-supported                                                                          |  951 B  00:00:00
正在解决依赖关系
--> 正在检查事务
---> 软件包 zabbix-agent.x86_64.0.5.0.0-1.el7 将被 安装
--> 解决依赖关系完成

依赖关系解决

=====================================================================================================================
 Package                       架构                    版本                            源                       大小
=====================================================================================================================
正在安装:
 zabbix-agent                  x86_64                  5.0.0-1.el7                     zabbix                  440 k

事务概要
=====================================================================================================================
安装  1 软件包

总计:440 k
安装大小:1.8 M
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  正在安装    : zabbix-agent-5.0.0-1.el7.x86_64                                                                  1/1
  验证中      : zabbix-agent-5.0.0-1.el7.x86_64                                                                  1/1

已安装:
  zabbix-agent.x86_64 0:5.0.0-1.el7

完毕!

↓↓↓↓↓↓

最近刚申请了个微信公众号,上面也会分享一些运维知识,大家点点发财手关注一波,感谢大家。 【原创公众号】:非著名运维 【福利】:公众号回复 “资料” 送运维自学资料大礼包哦!
在这里插入图片描述

  • 1
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

非著名运维

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值