运行yum install -y mssql-server命令时报错:Loaded plugins: fastestmirror File contains no section headers. file: file:///etc/yum.repos.d/mssql-server.repo
盖了帽了我的老宝贝,怎么又报错了?
错误出现场景:
Linux(centOS7)环境下安装SQLserver2017
运行yum install -y mssql-server命令时报错。
分析第一句错:Loaded plugins: fastestmirror
说这个什么快速插件没加载,没用。那我们直接干掉这个插件
- 修改 fastestmirror 插件配置文件
vim /etc/yum/pluginconf.d/fastestmirror.conf
修改 enable=1 为 enable=0
- 修改 yum 配置文件
vim /etc/yum.conf
修改为plugins=0 不使用插件
- 清除缓存并重新构建yum 源
yum clean all
yum clean dbcache
yum makecache
接下来我们看下一句错:File contains no section headers. file: file:///etc/yum.repos.d/mssql-server.repo
额,这个错找了半天,我解决不了。好吧此贴终结,再见。
开个玩笑,其实这个错的原因是在安装Linux系统(centOS7)的时候选择了最小化安装。换个更高的环境就行。因为最小化安装 很多东西有缺失,导致命令运行失败。
OK,如果想看详细安装步骤请移步:
在Linux系统下安装SQLserver2017数据库