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