尝试YUM install gcc gcc-g++ make
并失败:
Package: glibc-2.17-260.el7.i686 (RHEL_SEC_7)
Requires: glibc-common = 2.17-260.el7
Installed: glibc-common-2.17-260.el7_6.3.x86_64 (@anaconda/7.6)
glibc-common = 2.17-260.el7_6.3
Available: glibc-common-2.17-55.el7.x86_64 (RHEL_SEC_7)
glibc-common = 2.17-55.el7
Available: glibc-common-2.17-55.el7_0.1.x86_64 (RHEL_SEC_7)
glibc-common = 2.17-55.el7_0.1
Available: glibc-common-2.17-55.el7_0.3.x86_64 (RHEL_SEC_7)
glibc-common = 2.17-55.el7_0.3
Available: glibc-common-2.17-55.el7_0.5.x86_64 (RHEL_SEC_7)
glibc-common = 2.17-55.el7_0.5
Available: glibc-common-2.17-78.el7.x86_64 (RHEL_SEC_7)
glibc-common = 2.17-78.el7
Available: glibc-common-2.17-105.el7.x86_64 (RHEL_SEC_7)
glibc-common = 2.17-105.el7
Available: glibc-common-2.17-106.el7_2.1.x86_64 (RHEL_SEC_7)
glibc-common = 2.17-106.el7_2.1
Available: glibc-common-2.17-106.el7_2.4.x86_64 (RHEL_SEC_7)
glibc-common = 2.17-106.el7_2.4
Available: glibc-common-2.17-106.el7_2.6.x86_64 (RHEL_SEC_7)
glibc-common = 2.17-106.el7_2.6
Available: glibc-common-2.17-106.el7_2.8.x86_64 (RHEL_SEC_7)
glibc-common = 2.17-106.el7_2.8
Available: glibc-common-2.17-157.el7.x86_64 (RHEL_SEC_7)
glibc-common = 2.17-157.el7
Available: glibc-common-2.17-157.el7_3.1.x86_64 (RHEL_SEC_7)
glibc-common = 2.17-157.el7_3.1
Available: glibc-common-2.17-157.el7_3.2.x86_64 (RHEL_SEC_7)
glibc-common = 2.17-157.el7_3.2
Available: glibc-common-2.17-157.el7_3.4.x86_64 (RHEL_SEC_7)
glibc-common = 2.17-157.el7_3.4
Available: glibc-common-2.17-157.el7_3.5.x86_64 (RHEL_SEC_7)
glibc-common = 2.17-157.el7_3.5
Available: glibc-common-2.17-196.el7.x86_64 (RHEL_SEC_7)
glibc-common = 2.17-196.el7
Available: glibc-common-2.17-196.el7_4.2.x86_64 (RHEL_SEC_7)
glibc-common = 2.17-196.el7_4.2
Available: glibc-common-2.17-222.el7.x86_64 (RHEL_7.6)
glibc-common = 2.17-222.el7
Available: glibc-common-2.17-260.el7.x86_64 (RHEL_SEC_7)
glibc-common = 2.17-260.el7
但是,
yum list --showduplicates glibc
显示的输出:
Installed Packages
glibc.x86_64 2.17-260.el7_6.3 @anaconda/7.6
并
yum list --showduplicates glibc-common
显示:
Installed Packages
glibc-common.x86_64 2.17-260.el7_6.3 @anaconda/7.6
节目输出的片段yum -v -y install gcc gcc-c++ make
:
Package glibc.i686 0:2.17-260.el7 will be installed
为什么 yum 会尝试混合架构?如何强制 yum 仅安装 x86_64 依赖项?
这个
gcc
包有点特别,因为它里面的编译器可以生成 32 位和 64 位库。为此,它需要一些基本的 i686 系统库(libgcc
和glibc
)。除了重新编译编译器以禁用 32 位支持之外,您无能为力。你最好弄清楚为什么
glibc.i686
无法安装。看起来像版本不匹配,可能是由于 repos 的不兼容组合(您已安装的el7_6.3
版本glibc-common
,但glibc.i686
包需要el7
)。