zoukankan      html  css  js  c++  java
  • linux报错Loading mirror speeds from cached hostfile解决方法

    [root@hear yum.repos.d]# yum update
    Loaded plugins: fastestmirror
    Loading mirror speeds from cached hostfile
    No packages marked for update
    [root@hear yum.repos.d]# ls
    CentOS-Base.repo CentOS-Debuginfo.repo CentOS-Media.repo CentOS-Vault.repo mysql-community.repo
    CentOS-CR.repo CentOS-fasttrack.repo CentOS-Sources.repo epel.repo mysql-community-source.repo

    修改yum源,在安装更新rpm包时获得比较理想的速度。国内比较快的有163源、sohu源。这里以163源为例子。

    cd /etc/yum.repos.d
    mv CentOS-Base.repo CentOS-Base.repo.backup
    wget http://mirrors.163.com/.help/CentOS6-Base-163.repo
    mv CentOS6-Base-163.repo CentOS-Base.repo
    yum clean all

    [root@hear yum.repos.d]# mv CentOS-Base.repo CentOS-Base.repo.backup
    [root@hear yum.repos.d]# wget http://mirrors.163.com/.help/CentOS6-Base-163.repo
    --2020-01-08 00:11:00-- http://mirrors.163.com/.help/CentOS6-Base-163.repo
    Resolving mirrors.163.com (mirrors.163.com)... 59.111.0.251
    Connecting to mirrors.163.com (mirrors.163.com)|59.111.0.251|:80... connected.
    HTTP request sent, awaiting response... 200 OK
    Length: 2006 (2.0K) [application/octet-stream]
    Saving to: ‘CentOS6-Base-163.repo’

    100%[===========================================================================>] 2,006 --.-K/s in 0s

    2020-01-08 00:11:00 (192 MB/s) - ‘CentOS6-Base-163.repo’ saved [2006/2006]

    [root@hear yum.repos.d]# ls
    CentOS6-Base-163.repo CentOS-Debuginfo.repo CentOS-Sources.repo mysql-community.repo
    CentOS-Base.repo.backup CentOS-fasttrack.repo CentOS-Vault.repo mysql-community-source.repo
    CentOS-CR.repo CentOS-Media.repo epel.repo
    [root@hear yum.repos.d]# mv CentOS6-Base-163.repo CentOS-Base.repo
    [root@hear yum.repos.d]# yum clear all

  • 相关阅读:
    Codeforces Round #370 (Div. 2) D. Memory and Scores DP
    HDU 5876 Sparse Graph BFS 最短路
    HDU 5875 Function st + 二分
    HDU 5869 Different GCD Subarray Query 离线+树状数组
    2016 ACM/ICPC Asia Regional Dalian Online HDU 5877 Weak Pair treap + dfs序
    detection in video and image
    vs 2012打开vs2013的sln
    dl in image process
    classifier
    mark
  • 原文地址:https://www.cnblogs.com/caodneg7/p/12164442.html
Copyright © 2011-2022 走看看