RedHat yum 添加sohu源

来源:互联网 发布:装修效果图 设计软件 编辑:程序博客网 时间:2024/05/16 05:34

在redhat下面repos里面添加sohu的源一直报错:

运行命令:

yum makecache

报错如下:

Error: Eg. 5Server is not a valid release or hasnt been released yet/
http://mirrors.sohu.com/centos/5Server/addons/x86_64/repodata/repomd.xml not found 404

国内外的网站搜索的信息都无法解决,

最后更改了搜狐的yum 源文件CentOS-Base-sohu.repo

cd /etc/yum.repos.d

vi CentOS-Base-sohu.repo

修改全部的 “$releasever” 为 5.


在运行yum makecache

 加载shouhu的源成功。


添加sohu源的过程:

root~>cd /etc/yum.repos.d/
root~>wget http://mirrors.sohu.com/help/CentOS-Base-sohu.repo
root~>yum makecache

原创粉丝点击