zoukankan      html  css  js  c++  java
  • yum源 epel源 no package available 更换国内yum源

    有时候安装软件会出现 no package available  

    解决办法:yum install epel-release

    安装完会在/etc/yum.repos.d/目录下下生成两个repo文件:

    /etc/yum.repos.d/epel.repo              正式稳定版 
    /etc/yum.repos.d/epel-testing.repo  测试版软件,性能不稳定,有安全隐患

    默认情况下,只有正式版是有效状态的,

    如果你想试试测试版的话,需要修改/etc/yum.repos.d/epel-testing.repo,把enabled=0改成enabled=1即可。

    如果你暂时不想使用EPEL的yum源的话,把对应文件里的enabled=1改成enabled=0就行了

    如果你完全不需要了,那就直接卸载掉:

    rpm -e epel-release

     

    更换centos自带的yum源为阿里云的yum源,自带的源 地址在国外,下载速度慢

    1、备份

    mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup

    2、下载新的CentOS-Base.repo 到/etc/yum.repos.d/

    CentOS 5

    wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-5.repo

    CentOS 6

    wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo

    CentOS 7

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

    3、之后运行yum makecache生成缓存

     

    参考地址http://mirrors.aliyun.com/help/centos

     

     

  • 相关阅读:
    C++ const
    facebook hacker cup 2013资格赛第二题
    最大全1子矩阵
    java HashMap的keyset方法
    树状数组
    Java entry
    一个数学证明:1(1x1)(1x2)...(1xn)<=x1+x2+...+xn, xi在[0,1]
    传教士野蛮人过河问题python
    在cmd中为命令设置别名以及启动cmd时自动执行bat
    合取Λ,析取V,容易记混吗?
  • 原文地址:https://www.cnblogs.com/fanren224/p/8457324.html
Copyright © 2011-2022 走看看