Home > Article > Operation and Maintenance > What should I do if I get an error when installing yum under centos7?
Problem:
yum source repodata configuration file repomd.xml cannot be found.
The error is reported as follows:
##Solution: First find the path to repomd.xmlfind / -type f -name "repomd.xml"
We see that the path is:/mnt, and the error path is:/mnt/cdrom(Recommended tutorial:
centos tutorial)
Check that the mount point has mnt, so we need to find this path and change /mnt/cdrom to /mnt to configure the repodata/repomd.xml path
cd /etc/yum.repos.d/
vi CentOS-Media.repoChange the path to the path we found: change /mnt/cdrom to /mnt
Save and execute yum source
yum clean all yum makecache
The above is the detailed content of What should I do if I get an error when installing yum under centos7?. For more information, please follow other related articles on the PHP Chinese website!