Centos YUM组安装报错解决 yum grouplist 提示: There is no installed groups file (已解决)

问题被景:
由于需要,需安装Centos7.4 Infrastructure Server环境,但是在安装OS时,选择了Minmal安装
注:yum server 为自行搭建的内网yum服务器
解决思路
1、重新安装Centos7.4(不推荐)
2、使用yum grouplist /yum groupinstall 命令安装 Infrastructure Server相关包即可

问题
Yum grouplist 提示: There is no installed groups file

[root]# yum grouplist
Loaded plugins: fastestmirror
There is no installed groups file.
Maybe run: yum groups mark convert (see man yum)
Loading mirror speeds from cached hostfile

原因与解决方法
yum server 缺少groups 的定义文件,yum server端需使用createrepo生成

Yum Server端操作:
查找Groups file位置,前往yum相关目录创建goup file,**注:${Groups_File}为查找到的文件**
#find / -name *comps.xml*
#cd /var/ftp/Centos7.4
#createrepo -g ${Groups_File} .

注:如果已创建过,需更新的话使用命令 createrepo -g ${GROUPS_FILE} --update .



Client Server端操作:
#yum clean all ; yum makecache
#yum groupinstall -y Infrastructure Server

参考链接:
https://unix.stackexchange.com/questions/246953/how-do-i-get-yum-groupinstall-to-work-without-a-groups-install-file

Groups in yum are defined by the repositories themselves.

If yum group list does not list any groups, it means none of the enabled yum repositories have groups defined.

Groups in yum are generally defined in a /…-comps.xml file (or similar, where … is a random string) within the repodata directory of the repo.

If the repo was created manually, they may have forgotten to include a group file (or at least, forgot to use the one that comes with CentOS).

createrepo -g ${GROUPS_FILE} .
Will create a repo in the current directory, using the file defined by ${GROUPS_FILE}.

If the repo already exists and you simply want to add the groups file to it, you can use --update.

createrepo -g ${GROUPS_FILE} --update .
createrepo will copy the groups file into the repodata directory, so you don’t have to worry about the original copy.

  • 0
    点赞
  • 11
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值