侧边栏壁纸
博主昵称
洛叶

生活不是电影,再见容易,再见难

CentOS7更新阿里云yum源

2022年06月29日 742阅读 1评论 12点赞

最近遇到一个问题,让我百思不得其解
我已经更新阿里云yum源,国外的机子重装系统之后我都习惯性的换yum源
今天新买了台美国的机子,我换了阿里云yum源之后,是正常使用的,但是下面问题出现了,我重装了一次系统之后,yum命令就没有用了,一直提示下面的代码

    Loaded plugins: fastestmirror
    Loading mirror speeds from cached hostfile
    There are no enabled repos.
    Run "yum repolist all" to see the repos you have.
    You can enable repos with yum-config-manager --enable <repo>

我换了阿里云yum源,之前也是正常使用的,突然间就这样了,重装了几次系统也一直这样,百思不得其解,yum我换了之后是刷新过缓存的,之前也正常,md让我百思不得其解,后来想起来换一个方法试试,之前一直用的

    wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
    wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
    yum clean all
    yum makecache

换了一个方法就正常了,就他妈很玄学,之前一直正常突然间就不行了
进入yum文件夹

cd /etc/yum.repos.d

下载wget

    yum -y install wget
    yum install bash-completion
    yum -y install lrzsz

下载repo

    wget http://mirrors.aliyun.com/repo/Centos-7.repo

更新yum源

    yum clean all
    yum makecache

好久没更新了,真心不知道更新什么内容,让我接着水吧

12

—— 评论区 ——

博主关闭了所有页面的评论
博主栏壁纸
博主头像 洛叶

生活不是电影,再见容易,再见难

70 文章数
38 标签数
19 评论量