首页 > 系统相关 >记一次执行yum命令报错:Could not retrieve mirrorlist http://mirrorlist.centos.org/

记一次执行yum命令报错:Could not retrieve mirrorlist http://mirrorlist.centos.org/

时间:2023-12-28 10:37:03浏览次数:42  
标签:retrieve repository -- mirrorlist 报错 IPV6 yum yes 114.114


执行yum安装命令时报如下错误:

root@docker-test101 ~]# vi /etc/hosts
[root@docker-test101 ~]# yum install openssl* -y
Loaded plugins: fastestmirror, langpacks
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=os&infra=stock error was
14: curl#7 - "Failed to connect to 2604:1380:2001:d00::3: Network is unreachable"


 One of the configured repositories failed (Unknown),
 and yum doesn't have enough cached data to continue. At this point the only
 safe 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 working
        upstream. This is most often useful if you are using a newer
        distribution release than is supported by the repository (and the
        packages for the previous distribution release still work).

     3. Run the command with the repository temporarily disabled
            yum --disablerepo=<repoid> ...

     4. Disable the repository permanently, so yum won't use it by default. Yum
        will then just ignore the repository until you permanently enable it
        again or use --enablerepo for temporary usage:

            yum-config-manager --disable <repoid>
        or
            subscription-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 much
        slower). If it is a very temporary problem though, this is often a nice
        compromise:

            yum-config-manager --save --setopt=<repoid>.skip_if_unavailable=true

Cannot find a valid baseurl for repo: base/7/x86_64

综合其他博友的解决方法:
(1)、DNS配置国内DNS解析地址:

[root@docker-test101 ~]# vim /etc/resolv.conf 
# Generated by NetworkManager
nameserver 114.114.114.114
nameserver 114.114.114.115

(2)、网络配置文件网关配置,可能是网关配错了导致:

[root@docker-test101 ~]# vim /etc/sysconfig/network-scripts/ifcfg-ens33 
TYPE=Ethernet
PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO=static
DEFROUTE=yes
IPV4_FAILURE_FATAL=yes
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
IPV6_ADDR_GEN_MODE=stable-privacy
NAME=ens33
UUID=b7eb8914-c8e6-4546-9bc7-abdfefd11fa9
DEVICE=ens33
ONBOOT=yes
IPADDR=192.168.88.101
PREFIX=24
GATEWAY=192.168.88.2
DNS1=114.114.114.114
DNS2=114.114.114.115
IPV6_PRIVACY=no

总结:
所以遇到这种报错要从这两方面检查,DNS配置是否正确,网关配置是否正确。


标签:retrieve,repository,--,mirrorlist,报错,IPV6,yum,yes,114.114
From: https://blog.51cto.com/u_12484226/9010227

相关文章

  • wordpress博客系统报错
    第一种,只显示nginx的默认网页说明wordpress的网页配置文件没有被系统读取我们就需要去查看nginx的配置文件/etc/nginx/conf.d/default.conf首先,查看是不是没有添加编辑语言。因为,lnmp选用的是php作为后端语言,所以我们需要在配置文件中添加。第二,可以去看看wordpress的配置......
  • Sqoop连接数据库报错:Caused by: javax.net.ssl.SSLHandshakeException: No appropriat
    控制台报错:[[email protected]__hadoop-2.0.0-alpha]#./bin/sqooplist-databases--connectjdbc:mysql://192.168.45.10:3306--usernameroot--password1234562023-12-2802:58:50,807WARNtool.BaseSqoopTool:Settingyourpasswordonthecommand-linei......
  • ETCD 下线Member未剔除引发的日志报错
    背景介绍容器化的etcd集群原来具有三个节点分别为etcd-0,etcd-1,etcd-2,在节点etcd-2下线后剩两个节点etcd-0,etcd-1#kubectlgetpod-napisixNAMEREADYSTATUSRESTARTSAGEetcd-0......
  • Entity Framework中一对多关系关联id报错
    EntityFramework总是有那么一些令人无语的内置设定比如就遇到这么一个情况,building下有多个level则ef就会默认他们是一对多的情况,于是在对level进行增删改查时,就会找level中是否有building这个属性这时候如果你的level中没有Building则会报以下错误他告诉你,你的level中没......
  • swagger报错Unable to render this definition
    问题描述:访问swagger时,报错endofthestreamoradocumentseparatorisexpected,UnabletorenderthisdefinitionTheprovideddefinitiondoesnotspecifyavalidversionfield.PleaseindicateavalidSwaggerorOpenAPIversionfield.Supportedversionfields......
  • k8s 安装kubesphere3.4.1 多次安装报错 Error from server (InternalError): Internal
    failed:[localhost](item={'ns':'kubesphere-system','kind':'users.iam.kubesphere.io','resource':'admin','release':'ks-core'})=>{"ansible_loop_var":"......
  • 报错
    1.Youshouldconsiderupgradingviathe'C:\Users\榕宝\PycharmProjects\djangoProject\venv\Scripts\python.exe-mpipinstall--upgradepip'command.opython-mpipinstall--upgradepip   2.ERROR:Couldnotfindaversionthatsatisfie......
  • 完美解决SqlServer2012启动报错(cannot find one or more components.Please reinstall
    原因:默认安装在C:\ProgramFiles(x86)\MicrosoftVisualStudio10.0文件夹,以支持sqlserver2012.(我之前不小心把这个文件夹删除了)。解决方案:下载了visualstudio2010Isolatedshell完美解决问题,下载后安装就能正常运行SqlServer2012了,其他SqlServer版本请下载visualstudio......
  • Django 报错(You have 18 unapplied migration(s))
    pythonmanage.pyrunserver0.0.0.0:8000时报错:Youhave18unappliedmigration(s).Yourprojectmaynotworkproperlyuntilyouapplythemigrationsforapp(s):admin,auth,contenttypes,sessions.Run'pythonmanage.pymigrate'toapplythem.说明之前有......
  • 解决前端vue2报错 Error: Can't resolve cache-loader和Error: Can't resolve babel-l
    总得说来报这种Error:Can'tresolve+模块名字的错误,一般就只有两种原因:一、少了这个包(直接安装:pnpmadd-D模块名字@版本),二、有这个包,但是版本在package.json中不正确。需要和你的vue/cli-service的版本对应上,该降级的时候降级,降级一般先删除再安装新的pnpmremovecss-loaderpn......