由于在CentOS 5上下载SRPM失败,所以我报告了一个问题来解决这个问题

CentOS-Sources.repo文件有误。

yum install yum-utils
yumdownloader --source php

尝试访问的网址是http://vault.centos.org/centos/5/updates/Source/,但正确的网址应该是http://vault.centos.org/centos/5/updates/SRPM/。

处理

sed -i -e 's@/Source/@/SRPMS/@' /etc/yum.repos.d/CentOS-Sources.repo
yum clean all
yumdownloader --source php