您的位置:首页 > 新闻 > 会展 > 海报设计大赛_厦门建站价格_交易平台官网_四川seo关键词工具

海报设计大赛_厦门建站价格_交易平台官网_四川seo关键词工具

2025/1/9 4:04:42 来源:https://blog.csdn.net/qq_46028493/article/details/144993598  浏览:    关键词:海报设计大赛_厦门建站价格_交易平台官网_四川seo关键词工具
海报设计大赛_厦门建站价格_交易平台官网_四川seo关键词工具

参考

https://serverfault.com/questions/1161816/mirrorlist-centos-org-no-longer-resolve

修改 Centos 的 yum 源为阿里云

去阿里云 yum 镜像源官网:

https://developer.aliyun.com/mirror/

选择自己对应的操作系统,这里以 centos7 演示:

先备份原 yum 配置文件:

mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup

下载了阿里云提供的 CentOS 7 的 Yum 源配置文件,并将其覆盖到系统中的 /etc/yum.repos.d/CentOS-Base.repo 文件:

wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo# 或使用 curl 下载文件
curl -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo

清除旧缓存:

sudo yum clean all

生成新缓存:

sudo yum makecache

检验新配置是否生效:

yum repolist

提示不能解析 mirrorlist.centos.org

Could not retrieve mirrorlist http://mirrorlist.centos.org?arch=x86_64&release=7&repo=sclo-rh error was
14: curl#6 - "Could not resolve host: mirrorlist.centos.org; 未知的错误"One of the configured repositories failed (未知),and yum doesn't have enough cached data to continue. At this point the onlysafe thing yum can do is fail. There are a few ways to work "fix" this:1. Contact the upstream for the repository and get them to fix the problem.2. Reconfigure the baseurl/etc. for the repository, to point to a workingupstream. This is most often useful if you are using a newerdistribution release than is supported by the repository (and thepackages for the previous distribution release still work).3. Run the command with the repository temporarily disabledyum --disablerepo=<repoid> ...4. Disable the repository permanently, so yum won't use it by default. Yumwill then just ignore the repository until you permanently enable itagain or use --enablerepo for temporary usage:yum-config-manager --disable <repoid>orsubscription-manager repos --disable=<repoid>5. Configure the failing repository to be skipped, if it is unavailable.Note that yum will try to contact the repo. when it runs most commands,so will have to try and fail each time (and thus. yum will be be muchslower). If it is a very temporary problem though, this is often a nicecompromise:yum-config-manager --save --setopt=<repoid>.skip_if_unavailable=true

执行如下命令:

sudo sed -i s/mirror.centos.org/vault.centos.org/g /etc/yum.repos.d/CentOS-*.repo
sudo sed -i s/^#.*baseurl=http/baseurl=http/g /etc/yum.repos.d/CentOS-*.repo
sudo sed -i s/^mirrorlist=http/#mirrorlist=http/g /etc/yum.repos.d/CentOS-*.repo

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com