我印象里“标准安装”这一软件包组不带 gcc ,可用下列命令检查: LANG=C.UTF-8 dnf group info standard |tail -n +2 我在 openEuler 22.03 LTS 和 CentOS 9 Stream 上做了测试,结果见附件。
看到“将gcc从标准镜像的最小化安装中剔除”这一倡议,我怀疑是 standard 软件包组中,有非 -devel 的包依赖了 gcc 。可用下列命令检查: LANG=C.UTF-8 dnf repoquery --alldeps --whatrequires gcc |grep -v .src$ 测试条件同上,结果见附件。
分析上述附件: <openEuler-22.03-LTS-standard.txt xargs -I '{}' grep '^{}' openEuler-22.03-LTS-alldeps-gcc.txt |sort -u <CentOS-Stream-9-standard.txt xargs -I '{}' grep '^{}' CentOS-Stream-9-alldeps-gcc.txt |sort -u
结论如下: [argon@openEuler ~]$ <openEuler-22.03-LTS-standard.txt xargs -I '{}' grep '^{}' openEuler-22.03-LTS-alldeps-gcc.txt |sort -u kpatch-1:0.9.5-4.oe2203.x86_64 kpatch-1:0.9.5-5.oe2203.x86_64 [argon@openEuler ~]$ <CentOS-Stream-9-standard.txt xargs -I '{}' grep '^{}' CentOS-Stream-9-alldeps-gcc.txt |sort -u [argon@openEuler ~]$
因此或许问题只是 kpatch 依赖了 gcc : [argon@openEuler ~]$ dnf repoquery --requires kpatch /bin/bash bc bison elfutils-libelf-devel flex gcc git kernel-devel libc.so.6(GLIBC_2.34)(64bit) libelf.so.1()(64bit) libelf.so.1(ELFUTILS_1.0)(64bit) libelf.so.1(ELFUTILS_1.5)(64bit) libelf.so.1(ELFUTILS_1.6)(64bit) make openssl-devel patch rtld(GNU_HASH)
[argon@CentOS-9 ~]$ dnf repoquery --requires kpatch /usr/bin/bash bash binutils kmod [argon@CentOS-9 ~]$ dnf repoquery --requires kpatch-dnf /bin/sh python(abi) = 3.9 python3-dnf python3-hawkey [argon@CentOS-9 ~]$