在打补丁时提示
[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类似:
- 终端或宝塔的文件管理,进入/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 - 清理并重新生成yum缓存
终端执行如下命令
# yum clean all
# yum makecache
等待提示 Metadata cache created.即可正常yum了