yum error: Cannot retrieve repository metadata (repomd.xml) for repository It turns out that my yum source address should be updated!
The workaround is as follows:
Find the directory yum.repos.d, there is a file nginx.repo (this name may not be in your machine, the name should be customized), modify the address inside: baseurl=http://centos.ustc.edu.cn /centos/5/os/i386/
Run: yum clean all