Can't download gcc to properly install VirtualBox

Latest response

Whenever I use the command sudo yum install gcc / sudo yum install devtoolset-8 for running VirtualBox, I receive this output

Error: Package: glibc-2.17-307.el7.1.i686 (rhel-7-server-rpms)
Requires: glibc-common = 2.17-307.el7.1
Installed: glibc-common-2.17-316.el7.x86_64 (@anaconda/7.9)
glibc-common = 2.17-316.el7
Available: glibc-common-2.17-55.el7.x86_64 (rhel-7-server-rpms)
glibc-common = 2.17-55.el7
Available: glibc-common-2.17-55.el7_0.1.x86_64 (rhel-7-server-rpms)
glibc-common = 2.17-55.el7_0.1
Available: glibc-common-2.17-55.el7_0.3.x86_64 (rhel-7-server-rpms)
glibc-common = 2.17-55.el7_0.3
Available: glibc-common-2.17-55.el7_0.5.x86_64 (rhel-7-server-rpms)
glibc-common = 2.17-55.el7_0.5
Available: glibc-common-2.17-78.el7.x86_64 (rhel-7-server-rpms)
glibc-common = 2.17-78.el7
Available: glibc-common-2.17-105.el7.x86_64 (rhel-7-server-rpms)
glibc-common = 2.17-105.el7
Available: glibc-common-2.17-106.el7_2.1.x86_64 (rhel-7-server-rpms)
glibc-common = 2.17-106.el7_2.1
Available: glibc-common-2.17-106.el7_2.4.x86_64 (rhel-7-server-rpms)
glibc-common = 2.17-106.el7_2.4
Available: glibc-common-2.17-106.el7_2.6.x86_64 (rhel-7-server-rpms)
glibc-common = 2.17-106.el7_2.6
Available: glibc-common-2.17-106.el7_2.8.x86_64 (rhel-7-server-rpms)
glibc-common = 2.17-106.el7_2.8
Available: glibc-common-2.17-157.el7.x86_64 (rhel-7-server-rpms)
glibc-common = 2.17-157.el7
Available: glibc-common-2.17-157.el7_3.1.x86_64 (rhel-7-server-rpms)
glibc-common = 2.17-157.el7_3.1
Available: glibc-common-2.17-157.el7_3.2.x86_64 (rhel-7-server-rpms)
glibc-common = 2.17-157.el7_3.2
Available: glibc-common-2.17-157.el7_3.4.x86_64 (rhel-7-server-rpms)
glibc-common = 2.17-157.el7_3.4
Available: glibc-common-2.17-157.el7_3.5.x86_64 (rhel-7-server-rpms)
glibc-common = 2.17-157.el7_3.5
Available: glibc-common-2.17-196.el7.x86_64 (rhel-7-server-rpms)
glibc-common = 2.17-196.el7
Available: glibc-common-2.17-196.el7_4.2.x86_64 (rhel-7-server-rpms)
glibc-common = 2.17-196.el7_4.2
Available: glibc-common-2.17-222.el7.x86_64 (rhel-7-server-rpms)
glibc-common = 2.17-222.el7
Available: glibc-common-2.17-260.el7.x86_64 (rhel-7-server-rpms)
glibc-common = 2.17-260.el7
Available: glibc-common-2.17-260.el7_6.3.x86_64 (rhel-7-server-rpms)
glibc-common = 2.17-260.el7_6.3
Available: glibc-common-2.17-260.el7_6.4.x86_64 (rhel-7-server-rpms)
glibc-common = 2.17-260.el7_6.4
Available: glibc-common-2.17-260.el7_6.5.x86_64 (rhel-7-server-rpms)
glibc-common = 2.17-260.el7_6.5
Available: glibc-common-2.17-260.el7_6.6.x86_64 (rhel-7-server-rpms)
glibc-common = 2.17-260.el7_6.6
Available: glibc-common-2.17-292.el7.x86_64 (rhel-7-server-rpms)
glibc-common = 2.17-292.el7
Available: glibc-common-2.17-307.el7.1.x86_64 (rhel-7-server-rpms)
glibc-common = 2.17-307.el7.1
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest

Is it because of my subscription?? I use Red Hat Developer Subscription.

When I run this command sudo subscription-manager list --consumed
I receive this:
+-------------------------------------------+
Consumed Subscriptions
+-------------------------------------------+
Subscription Name: Red Hat Developer Subscription
Provides: Red Hat Enterprise Linux High Availability - Update Services for SAP
Solutions
MRG Realtime
Red Hat CodeReady Linux Builder for x86_64
Red Hat Enterprise Linux Atomic Host
Red Hat Container Development Kit
Red Hat Enterprise Linux Atomic Host Beta
Red Hat CodeReady Linux Builder for ARM 64
Red Hat Developer Tools (for RHEL Server)
Red Hat Container Images
Red Hat Developer Tools Beta (for RHEL Server)
Red Hat Container Images Beta
Red Hat Developer Toolset (for RHEL Server)
Red Hat Enterprise Linux High Performance Networking (for RHEL Server)
Red Hat Enterprise Linux High Performance Networking (for RHEL Server) -
Extended Update Support
Red Hat Enterprise Linux High Performance Networking (for RHEL Compute Node)
Red Hat Enterprise Linux for x86_64
Red Hat Enterprise Linux Resilient Storage for x86_64
Red Hat Enterprise Linux Resilient Storage for x86_64 - Extended Update
Support
dotNET on RHEL (for RHEL Server)
Red Hat Enterprise Linux Scalable File System (for RHEL Server)
Red Hat Enterprise Linux for x86_64 - Extended Update Support
Red Hat Enterprise Linux Scalable File System (for RHEL Server) - Extended
Update Support
dotNET on RHEL Beta (for RHEL Server)
Red Hat Enterprise Linux for ARM 64
Red Hat Beta
Red Hat EUCJP Support (for RHEL Server) - Extended Update Support
Oracle Java (for RHEL Server)
RHEL for SAP (for IBM Power LE) - Update Services for SAP Solutions
Red Hat Enterprise Linux for SAP HANA for x86_64
Red Hat Enterprise Linux for Real Time
Red Hat Enterprise Linux Server - Update Services for SAP Solutions
Red Hat Enterprise Linux for SAP Applications for x86_64
Red Hat Software Collections (for RHEL Server)
RHEL for SAP - Update Services for SAP Solutions
Oracle Java (for RHEL Server) - Extended Update Support
RHEL for SAP - Extended Update Support
RHEL for SAP HANA - Update Services for SAP Solutions
Red Hat CodeReady Linux Builder for x86_64 - Extended Update Support
Red Hat S-JIS Support (for RHEL Server) - Extended Update Support
RHEL for SAP HANA - Extended Update Support
Red Hat Software Collections Beta (for RHEL Server)
Red Hat Enterprise Linux High Availability for x86_64
Red Hat Enterprise Linux High Availability for x86_64 - Extended Update
Support
Red Hat Ansible Engine
Red Hat Enterprise Linux Load Balancer (for RHEL Server)
Red Hat Enterprise Linux Load Balancer (for RHEL Server) - Extended Update
Support
Red Hat Enterprise Linux Server
SKU: RH00798
Contract:
Account:
Serial: 8630194512877213927
Pool ID: 8a85f999723883e101726a7ef17c3a12
Provides Management: No
Active: True
Quantity Used: 1
Service Type:
Roles:
Service Level: Self-Support
Usage:
Add-ons:
Status Details: Subscription is current
Subscription Type: Standard
Starts: 05/31/2020
Ends: 05/31/2021
Entitlement Type: Physical

Responses

Looks like rhel is trying to install .686 (32 bit) glibc package, but you have the x86_64 (64 bit) glibc-common package installed. Can you try installing glibc x86_64 package?

Thanks Martin for your response,

When I run this command as sudo : yum install glibc, I receive this: Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-manager Package matching glibc-2.17-307.el7.1.x86_64 already installed. Checking for update. Nothing to do

Is this the package you're referring to?

I guess the problem is that when I install the gcc using yum install gcc / sudo yum install devtoolset-8 , the command tries to use a .686 package, could I write in the command to explictly use the x86_64 package?

Have you tried just running
yum clean all
yum install devtoolset-8
And letting yum hopefully install any prereqs?

Unfortunately, the same error.

The problem is no longer exist. I reinstalled the Red Hat Linux but choose to add Development Tools in the installation, and it works now.