报:File contains no section headers.
原因是没有配置yum源!解决如下:
第一种方案:
修改/etc/yum.repos.d/CenOS-Base.repo文件内容如下:
# CentOS-Base.repo
#
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client. You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
本文介绍了如何解决Yum报错'File contains no section headers.'的问题,提供了两种解决方案:一是编辑并更新/etc/yum.repos.d/CentOS-Base.repo文件内容;二是删除原有文件,从阿里云下载新的CentOS-Base.repo文件,并进行缓存清理。
订阅专栏 解锁全文

1万+

被折叠的 条评论
为什么被折叠?



