ps:来源 https://www.cnblogs.com/justphp/p/5959655.html

办法一:改dns解析

  vim /etc/resolv.conf

添加:

    nameserver 8.8.8.8

    search localdomain

结果:没用!

办法二:修改镜像源

  vim /etc/yum.repos.d/CentOS-Base.repo

参考:https://lug.ustc.edu.cn/wiki/mirrors/help/centos

结果:还是没用!

办法三:修复网络链路

  vim /etc/sysconfig/network-scripts/ifcfg-ens33  [注意一下,ifcfg-ens33后面的数字是随机产生的。]

  将ONBOOT改为yes,重新启动网络,service network restart

结果:成功了!

亲测有效

Centos7 yum install vim 出现“could not retrieve mirrorlist”的更多相关文章

  1. 【在下版本,有何贵干?】Dockerfile中 RUN yum -y install vim失败Cannot prepare internal mirrorlist: No URLs in mirrorlist

    隐秘的版本问题---- Dockerfile中 RUN yum -y install vim失败Cannot prepare internal mirrorlist: No URLs in mirro ...

  2. CentOS7 yum install elasticsearch

    首先安装 JDK 环境 # 本机是否已经安装,ElasticSearch 最低支持 jdk 1.7 yum list installed | grep java # 查看 yum 库中的 java 安 ...

  3. Centos7 yum install chrome

    一.配置 yun 源 vim /etc/yum.repos.d/google-chrome.repo [google-chrome] name=google-chrome baseurl=http:/ ...

  4. centos7 yum install redis

    直接yum 安装的redis 不是最新版本 yum install redis 如果要安装最新的redis,需要安装Remi的软件源,官网地址:http://rpms.famillecollet.co ...

  5. centos7#yum install ffmpeg

    yum install ffmpeg rpm --import http://li.nux.ro/download/nux/RPM-GPG-KEY-nux.ro rpm -Uvh http://li. ...

  6. centos7 yum install timeout

    https://yum.dockerproject.org/repo/main/centos/7/repodata/repomd.xml: [Errno 12] Timeout on https:// ...

  7. [CentOS7] minimal安装后 出现 没有ifconfig 无法ping 无法yum could not retrieve mirrorlist http://mirrorlist.centos.org/

    刚以minimal方式安装完CentOS,打算看下ip,结果ifconfig没找到(后来得知可以用ip addr查看本机ip) 于是yum grouplist, 结果出现could not retri ...

  8. yum 安装vim编辑器

    在我们使用的vi编辑器中没有配色不是很好用,我们安装一个vim富文本编辑器方便我们的文本编辑. [root@localhost ~]# yum install vim -y已加载插件:fastestm ...

  9. yum安装命令:遇到的问题报错如下: File "/usr/bin/yum", line 30 except KeyboardInterrupt, e: 通过看报错可以了解到是使用了python2的语法,所以了解到当前yum使用的Python2,因为我单独安装了python3,且python3设置为默认版本了,所以导致语法问题 解决方法: 使用python2.6 yum install

    1.安装zip yum install -y unzip zip 2.安装lrszs yum -y install lrzsz 3.安装scp 遇到下面的问题: 结果提示: No package sc ...

随机推荐

  1. http://218.245.4.98:20000/phpmyadmin:2018SCTF--easiest web - phpmyadmin

      SCTF的web最简单题,好难好难好难.      直接进去就是PHPmyadmin界面(即mysql的网页界面),需要登录密码,这个我当时没有破解出来,谁知道账号密码是root/root咩,要是 ...

  2. 21 pythone【入门指南】:string

    string是很基础的数据结构,来看看string有哪些常用的操作. #!/bin/python #!---encoding: UTF- s = 'abcdefg' #concat s1 = s + ...

  3. [剑指Offer]52-两个链表的第一个公共节点

    题目链接 https://www.nowcoder.com/practice/6ab1d9a29e88450685099d45c9e31e46?tpId=13&tqId=11189&t ...

  4. class configured for Signature (provider: BC) cannot be found

    java.security.NoSuchAlgorithmException: class configured for Signature (provider: BC) cannot be foun ...

  5. 小程序 picker 多列选择器 数据动态获取

    需求是将各校区对应各班级的数据 以两列选择器的方式展示出来,并且可以在选择完成之后记录选结果参数. 校区数据 和 班级数据 分别是两个接口,以 校区 teach_area_id 字段关联 其各班级数据 ...

  6. 基于RBAC权限验证, 中间价middleware实现, views 登录视图代码

    废话不多说  上代码: 基础实现: rom django.shortcuts import HttpResponse, redirect, render from django.http import ...

  7. Excel怎么下拉框多选

    打开Exlce, 确定,然后 右击查看代码,把这段代码复制到新建的文件里面 此时Excel会给出提示,选择否,,系统会提示保存,在保存的时候选择启用宏的工作簿然后保存,此时Excel下拉框多选就搞定了 ...

  8. 1N - 计算球体积

    根据输入的半径值,计算球的体积. Input 输入数据有多组,每组占一行,每行包括一个实数,表示球的半径. Output 输出对应的球的体积,对于每组输入数据,输出一行,计算结果保留三位小数. Sam ...

  9. (转)ScriptManager.RegisterStartupScript方法和Page.ClientScript.RegisterStartupScript() 方法

    ScriptManager.RegisterStartupScript方法 如果页面中不用Ajax,cs中运行某段js代码方式可以是: Page.ClientScript.RegisterStartu ...

  10. Android.Tools.Eclipse hangs at the Android SDK Content Loader

    Eclipse hangs at the Android SDK Content Loader http://stackoverflow.com/questions/13489141/eclipse- ...