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

报错信息:

[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

完毕!

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