Home >Operation and Maintenance >CentOS >What should I do if I get an error when installing yum under centos7?

What should I do if I get an error when installing yum under centos7?

王林
王林Original
2020-04-01 11:41:493746browse

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:

What should I do if I get an error when installing yum under centos7?

##Solution:

First find the path to repomd.xml

find / -type f -name "repomd.xml"

What should I do if I get an error when installing yum under centos7?

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

What should I do if I get an error when installing yum under centos7?

to configure the repodata/repomd.xml path

cd /etc/yum.repos.d/

What should I do if I get an error when installing yum under centos7?

vi CentOS-Media.repo

What should I do if I get an error when installing yum under centos7?

Change the path to the path we found: change /mnt/cdrom to /mnt

What should I do if I get an error when installing yum under centos7?

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn