环境
- 红帽企业Linux 7.0
- 百胜
问题
-
yum groupinstall "Office Suite and Productivity"
在Red Hat Enterprise Linux 7上失败并出现错误There is no installed groups file
-
yum groupinstall "Office Suite and Productivity"
Loaded plugins: langpacks, product-id, subscription-manager
There is no installed groups file.
Maybe run: yum groups mark convert (see man yum)
Warning: Group office-suite does not have any packages to install.
Maybe run: yum groups mark install (see man yum)
No packages in any requested group available to install or update
yum groupinstall "Graphical Administration Tools"
Loaded plugins: langpacks, product-id, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
There is no installed groups file.
Maybe run: yum groups mark convert (see man yum)
Warning: Group graphical-admin-tools does not have any packages to install.
Group graphical-admin-tools does have 1 conditional packages, which may get installed.
Maybe run: yum groups mark install (see man yum)
No packages in any requested group available to install or update
yum groupinstall "System Administration Tools"
Loaded plugins: langpacks, product-id, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
There is no installed groups file.
Maybe run: yum groups mark convert (see man yum)
Warning: Group system-admin-tools does not have any packages to install.
Maybe run: yum groups mark install (see man yum)
No packages in any requested group available to install or update
- yum组安装“ kde-desktop”失败,并显示“任何请求的组中没有软件包可用于安装或更新”消息。
解析度
-
在Red Hat Enterprise Linux 7中,yum已更改。软件包组“ Office Suite和Productivity”仅具有可选软件包,默认情况下不会安装这些可选软件包。因此,我们也需要传递选项来安装可选软件包!
-
因此,要安装上述软件包组,请运行以下命令。
# yum groupinstall "Office Suite and Productivity" --setopt=group_package_types=mandatory,default,optional
- 有关如何在yum命令行上提供yum配置参数的更多信息,请参考392183
根本原因
- 在Red Hat Enterprise Linux 7中,yum已更改。软件包组“ Office Suite和Productivity”仅具有可选软件包,默认情况下不会安装这些可选软件包。因此,我们也需要传递选项来安装可选软件包!
-
如果您在系统上安装了所有强制性软件包,则当前的行为在设计上是正确的。RHEL-7引入了将程序包组作为对象(类似于额外程序包)处理的新概念,而以前,组的存在是由各个程序包的存在来定义的。
-
在以下两种情况下可以更好地解释:
A)如果“开发”组的所有软件包部分都已安装(例如,通过yum组安装),并且由于您还希望使用开发组的将来更新(例如,添加软件包),组应标记为已安装(默认情况下,如果您通过yum group install安装了软件包)。B)您不小心安装了相同的软件包集,但是您可能对开发组特别感兴趣(因为您没有直接安装它),因此,您不想使其保持最新(单个软件包更新除外)。在这种情况下,该组不应标记为已安装。
如果您处于情况B),但您想切换到A)。为此,您需要运行
yum组mark安装“开发工具”
,以便让yum知道您确实希望该组存在。
替代方法是调整系统的供应方式,以便您将安装软件包组(方案A),而不是安装单个软件包(方案B)。
另外,也许我们可以考虑实施RFE,以便在所有必需软件包都存在的情况下,在“ yum group install Group”之后将该组标记为自动安装。
诊断步骤
- 如果所有软件包都已在系统配置过程中或已手动安装,则可以看到该组仍未列出为已安装-这是预期的!
# yum grouplist
Loaded plugins: product-id, search-disabled-repos, subscription-manager
There is no installed groups file.
Maybe run: yum groups mark convert (see man yum)
Available Environment Groups:
Minimal Install
Infrastructure Server
File and Print Server
Basic Web Server
Virtualization Host
Server with GUI
Available Groups:
Compatibility Libraries
Console Internet Tools
Development Tools
Graphical Administration Tools
Legacy UNIX Compatibility
Scientific Support
Security Tools
Smart Card Support
System Administration Tools
System Management
Done
- 但是在详细的输出中,我们可以看到该组中的所有软件包都已安装(软件包名称前的额外空格表示已安装软件包,但不是组安装的一部分,请参见man yum)。
# yum group info 'Development Tools'
Loaded plugins: product-id, search-disabled-repos, subscription-manager
There is no installed groups file.
Maybe run: yum groups mark convert (see man yum)
Group: Development Tools
Group-Id: development
Description: A basic development environment.
Mandatory Packages:
autoconf
automake
binutils
bison
flex
gcc
gcc-c++
gettext
libtool
make
patch
pkgconfig
redhat-rpm-config
rpm-build
rpm-sign
Default Packages:
byacc
cscope
ctags
diffstat
doxygen
elfutils
gcc-gfortran
git
indent
intltool
patchutils
rcs
subversion
swig
systemtap
Optional Packages:
ElectricFence
ant
babel
bzr
chrpath
cmake
compat-gcc-44
compat-gcc-44-c++
compat-gcc-44-g77
cvs
dejagnu
expect
gcc-gnat
gcc-objc
gcc-objc++
imake
javapackages-tools
ksc
libstdc++-docs
mercurial
mod_dav_svn
nasm
perltidy
python-docs
rpmdevtools
rpmlint
systemtap-sdt-devel
systemtap-server
现在,我们最终可以将组标记为手动安装。
# yum groups mark install "Development Tools"
# yum group list
Loaded plugins: product-id, search-disabled-repos, subscription-manager
Available Environment Groups:
Minimal Install
Infrastructure Server
File and Print Server
Basic Web Server
Virtualization Host
Server with GUI
Installed Groups:
Development Tools
Available Groups:
Compatibility Libraries
Console Internet Tools
Graphical Administration Tools
Legacy UNIX Compatibility
Scientific Support
Security Tools
Smart Card Support
System Administration Tools
System Management
Done
- 已安装的程序包以一个额外的空间作为前缀(不是真正的用户友好方式)