300字范文,内容丰富有趣,生活中的好帮手!
300字范文 > 记录一下 yum install *** 报错问题:failure: repodata/repomd.xml from tvinternal_dev: [Errno 256] No more mirr

记录一下 yum install *** 报错问题:failure: repodata/repomd.xml from tvinternal_dev: [Errno 256] No more mirr

时间:2021-05-17 16:44:02

相关推荐

记录一下 yum install *** 报错问题:failure: repodata/repomd.xml from tvinternal_dev: [Errno 256] No more mirr

本想centos7中安装一个google浏览器,于是便遇上了yum报错问题,不管install任何软件,都会报错,真是气煞老夫!

报错内容如下:

已加载插件:fastestmirror, langpacksLoading mirror speeds from cached hostfileepel/x86_64/metalink | 7.1 kB00:00* base: * epel: * extras: * updates: base | 3.6 kB00:00docker-ce-stable | 3.5 kB00:00epel | 4.7 kB00:00extras | 2.9 kB00:00teamviewer | 2.5 kB00:00http://lnxrelease-02/yum/stable/main/binary-x86_64/repodata/repomd.xml: [Errno 14] curl#6 - "Could not resolve host: lnxrelease-02; 未知的错误"正在尝试其它镜像。One of the configured repositories failed (TeamViewer Internal (Dev Nightly Packages) - x86_64),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=tvinternal_dev ...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 tvinternal_devorsubscription-manager repos --disable=tvinternal_dev5. 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=tvinternal_dev.skip_if_unavailable=truefailure: repodata/repomd.xml from tvinternal_dev: [Errno 256] No more mirrors to try.http://lnxrelease-02/yum/stable/main/binary-x86_64/repodata/repomd.xml: [Errno 14] curl#6 - "Could not resolve host: lnxrelease-02; 未知的错误"

在网上找了找原因,发现是源的问题!

解决办法: 干它…

第一步:删除 /etc/yum.repos.d 下的所有内容 (或只删除Centos-7.repo,猫哥是都删了)

rm -rf /etc/yum.repos.d/CentOS-*

第二步:下载国内源

curl -o /etc/yum.repos.d/CentOS-Base.repo /repo/

第三步:清除缓存,更新yum

yum clean allyum clean metadatayum update

结果:

[root@localhost yum.repos.d]# yum update已加载插件:fastestmirror, langpacksDetermining fastest mirrors* base: * extras: * updates: base | 3.6 kB00:00extras | 2.9 kB00:00updates| 2.9 kB00:00(1/4): base/7/x86_64/group_gz| 153 kB 00:00(2/4): extras/7/x86_64/primary_db| 190 kB 00:00(3/4): updates/7/x86_64/primary_db| 168 kB 00:00(4/4): base/7/x86_64/primary_db | 6.1 MB 00:00No packages marked for update[root@localhost yum.repos.d]# ls

删除 /etc/yum.repos.d 下的所有内容可能会存在隐患,不过至今为止,一切正常,还没发现什么幺蛾子!

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。