File contains no section headers. File: File: / / etc/ yum.repos .d/

When executing the installation instruction using the yum command, File contains no Section Headers. File: file:///etc/yum.repos.d/
The reason is that there is no yum source configured in the configuration,
Solutions:
Method 1: Configure yum source and modify the /etc/yum.repos. D/cenos-base.repo file
Method 2: Delete the original file and download it again
Delete the original file RM-f /etc/yum.repos. D/cenos-base.repo
To download, wget -o/etc/yum repos. D/CentOS – Base. ‘http://mirrors.aliyun.com/repo/Centos-7.repo
Clean up the cache of Yum Clean All

Read More: