yum下载Zabbix4.0报errno256 no more mirrors to try

前言

今天安装zabbix是时,一直报错尝试了很多解决办法。现进行记录,帮助大家少走弯路。用yum安装zabbix时

失败的解决办法

  1. 网上最多的解决办法就是
    清缓存
yum clean all
yum makecache
yum update

2.下载ftp和talent(这个可能有用)

[root@server ~]# rpm -qa |grep ftp
[root@server ~]# rpm -qa |grep telnet-*
[root@server ~]# yum install ftp-* -y
[root@server ~]# yum install telnet-* -y

最终解决办法

首先感谢 https://www.cnblogs.com/opsprobe/p/11717539.html 这位博主提出的办法。他的办法是换源。我也一直认为是被墙了,无法下载下来,但是LT出去还是报错。最后换源下载成功。
在这里插入图片描述
这里是我根据博主换成阿里的源仍然不行,后面在查找到了清华的源。下面以代码形式贴出。
首先编辑

 vim /etc/yum.repos.d/zabbix.repo
[zabbix]
name=Zabbix Official Repository - $basearch
#baseurl=http://repo.zabbix.com/zabbix/4.0/rhel/7/$basearch/
baseurl=https://mirror.tuna.tsinghua.edu.cn/zabbix/zabbix/4.0/rhel/7/$basearch/ 
#这里我们换成清华的yum源
enabled=1
gpgcheck=1
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/4.0/rhel/7/$basearch/debuginfo/
baseurl=https://mirror.tuna.tsinghua.edu.cn/zabbix/zabbix/4.0/rhel/7/$basearch/debuginfo/
#换了上面Zabbix的安装源地址,其组件地址也要记得换! 
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX-A14FE591
gpgcheck=1

[zabbix-non-supported]
name=Zabbix Official Repository non-supported - $basearch
#baseurl=http://repo.zabbix.com/non-supported/rhel/7/$basearch/
baseurl=https://mirror.tuna.tsinghua.edu.cn/zabbix/non-supported/rhel/7/$basearch/
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX
gpgcheck=1
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值