centos7 下的“No packages in any requested group available to install or update”问题
centos7 的“No packages”问题
原
centos7 下的“No packages in any requested group available to install or update”问题
今天用yum 安装x-windows,报如下错误:
sudo yum groups install "X Window System"
Loading mirror speeds from cached hostfile
* base: mirrors.shu.edu.cn
* epel: mirror.dmmlabs.jp
* extras: mirrors.cn99.com
* updates: mirrors.cn99.com
Maybe run: yum groups mark install (see man yum)
No packages in any requested group available to install or update
不能安装,说无效,命令没错,去官网查找原因,在官网看到Why yum groupinstall "package group name" is failing on RHEL 7 with error "There is no installed groups file" ? 正好描述了这个问题。
原来在7之后,默认选项并没有被安装导致的,需要自己添加默认项,解决方案:yum groupinstall "Office Suite and Productivity" --setopt=group_package_types=mandatory,default,optional
在后面加上--setopt=group_package_types=mandatory,default,optional 即可:
sudo yum groupinstall "X Window System" --setopt=group_package_types=mandatory,default,optional