开发者社区> 问答> 正文

Centos7 修改yum源为sohu的

问了百度大叔,百度大叔给了我清一色的答案,我跟着做啊,,做啊


然后,并没有什么卵用,我该怎么搞?


这个是搜狐那下下来,我修改后的




然后 yum clean all && yum makecache


激动人心的时刻到了。。。


yum list nginx


结果显示的还是阿里云里面的版本,没有变成搜狐镜像里的版本。。。为何啊!

展开
收起
marico 2015-12-23 11:59:00 11567 0
1 条回答
写回答
取消 提交回答
  • 旺旺:nectar2。
    楼主您好,

    抱歉给您带来不便。

    小二正在为您在测试机里安装CentOS 7的镜像,之后为您做测试喔。

    -------------------------

    您好,

    小二为您尝试按 http://mirrors.sohu.com/help/centos.html 这里的设置,遇到以下出错信息:

    [root@iZ23jyp275rZ yum.repos.d]# yum makecache
    Loaded plugins: langpacks
    Repository base is listed more than once in the configuration
    Repository updates is listed more than once in the configuration
    Repository extras is listed more than once in the configuration
    Repository centosplus is listed more than once in the configuration
    Repository contrib is listed more than once in the configuration
    http://mirrors.sohu.com/centos/7/addons/x86_64/repodata/repomd.xml: [Errno 14] HTTP Error 404 - Not Found
    Trying other mirror.
    http://mirror.centos.org/centos/7/addons/x86_64/repodata/repomd.xml: [Errno 14] HTTP Error 404 - Not Found
    Trying other mirror.


    One of the configured repositories failed (CentOS-7 - Addons - sohu.com),
    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:

    为您查看了一下epel上的nginx包,与阿里云上的版本是一样的(nginx-1.6.3-7.el7.x86_64.rpm
    ): https://dl.fedoraproject.org/pub/epel/7/x86_64/n/

    所以,小二为您按照nginx官方的,添加了一个文件,之后就可以查询到新版本的nginx了: http://nginx.org/en/linux_packages.html

    root@iZ23jyp275rZ yum.repos.d]# yum list nginx
    Loaded plugins: langpacks
    Available Packages
    nginx.x86_64                       1:1.8.0-1.el7.ngx                       nginx




    2015-12-23 13:41:21
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
CentOS Nginx PHP JAVA 多语言镜像使用手 立即下载
CentOS Nginx PHP JAVA多语言镜像使用手册 立即下载
低代码开发师(初级)实战教程 立即下载