"oc-mirror" on RHEL 7 Error "/lib64/libc.so.6: version `GLIBC_2.28' not found (required by oc-mirror)"
Environment
- Red Hat Enterprise Linux 7 and below.
oc-mirrorplugin.
Issue
-
Getting the below error when running the
oc-mirrorcommand on RHEL7 and below:oc-mirror: /lib64/libc.so.6: version `GLIBC_2.28' not found (required by oc-mirror)
Resolution
Note: The below procedure is a Workaround and NOT a FIX.
- To utilize
oc-mirrorplugin, it should be executed from a system running RHEL8 and above. - As a workaround, the
oc-mirrorplugin can be used within a RHEL8 or RHEL8 container base image (i.e. UBI8 or UBI9) on a RHEL7 system. - Below is showing how to utilize a UBI8 container image:
-
To create a UBI8 temporary container, run the below command from the RHEL7 (or below) system that has access to "registry.redhat.io" registry using a valid credentials:
NOTE: Before proceeding with the below command, you need to make sure thatpodmanpackages are present in the system.# podman run -dt --name ubi8 --hostname ubi8-CONT registry.redhat.io/ubi8 bash Trying to pull registry.redhat.io/ubi8... Getting image source signatures Copying blob 36270d048bc7 done Copying config 27e761650a done Writing manifest to image destination Storing signatures f65d5cca0ce7981ba076fefb2bbda8fd0f8d1689c055eba0355c6eac62b4c0d6 [root@ocp-services2 ~]# podman exec -it ubi8 bash [root@ubi8-CONT /]# -
Use the below command to fetch the latest binary for
oc-mirrorplugin:[root@ubi8-CONT /]# curl https://mirror.openshift.com/pub/openshift-v4/x86_64/clients/ocp/stable/oc-mirror.tar.gz|tar xzf - -C /usr/local/bin/ && chmod +x /usr/local/bin/oc-mirror % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 55.1M 100 55.1M 0 0 33.4M 0 0:00:01 0:00:01 --:--:-- 33.4M -
Now, the "oc-mirror" command should work within the temporary container:
[root@ubi8-CONT /]# oc-mirror version Client Version: version.Info{Major:"", Minor:"", GitVersion:"4.13.0-202308290326.p0.g2f7e7bc.assembly.stream-2f7e7bc", GitCommit:"2f7e7bc237611601702ae32c3055a44f9694bf97", GitTreeState:"clean", BuildDate:"2023-08-29T03:45:07Z", GoVersion:"go1.19.10 X:strictfipsruntime", Compiler:"gc", Platform:"linux/amd64"} -
Before proceeding with using the "oc-mirror" command, make sure to copy the pull-secret file into the UBI8 container:
# podman cp ~/.docker ubi8:/root/ -
Desired certificate files could also be copied into the UBI8 container and activated:
# podman cp /Path_To_certifacte_File ubi8:/etc/pki/ca-trust/source/ # podman exec -it ubi8 bash [root@ubi8-CONT /]# update-ca-trust extract
-
Root Cause
- The
oc-mirrorplugin is supported for RHEL8 and above.
Diagnostic Steps
-
Run "oc-mirror" command with any option, it will fail with a missing
GLIBC_2.28library error:# oc-mirror version oc-mirror: /lib64/libc.so.6: version `GLIBC_2.28' not found (required by oc-mirror)
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.