【alinux打补丁】Alibaba Cloud Linux yum时报Couldn‘t resolve host name for http://mirrors.cloud.aliyuncs.com

在打补丁时提示

[Errno 256] Couldn’t resolve host name for http://mirrors.cloud.aliyuncs.com/****/repomd.xml

实测mirrors.cloud.aliyuncs.com这个镜像站根本不能访问,因为是国产linux,不能换其他通用镜像网站,网上搜了下这个mirrors.aliyun.com镜像站是正常的,只需把网址mirrors.cloud.aliyuncs.com替换为mirrors.aliyun.com即可。做法与centOS类似:

  1. 终端或宝塔的文件管理,进入/etc/yum.repos.d,分别修改如下文件:
    AliYun.repo
    epel-modular.repo
    epel-testing-modular.repo
    epel-testing.repo
    epel.repo
    将mirrors.cloud.aliyuncs.com批量替换为mirrors.aliyun.com
  2. 清理并重新生成yum缓存
    终端执行如下命令
# yum  clean  all
# yum  makecache

等待提示 Metadata cache created.即可正常yum了

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值