问题:已经配置好sohu下载源
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.old
cd /etc/yum.repos.d/
wget http://c.sihost.net/CentOS-Base-sohu.repo
mv CentOS-Base-sohu.repo CentOS-Base.repo
使用yum安装软件的时候报错
[Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found" Trying other mirror. [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found" Trying other mirror.
在网上查了一下,发现sohu下载源的url实际是 http://mirrors.sohu.com/centos/6/os/x86_64/
而配置文件中的baseurl是取的变量
vim /etc/yum/repos.d/CentOS-Base.repo
找到所有的baseurl=那一行,“=”后面都改成实际的url,保存退出。再运行yum就正常了。