Why yum fails with the message "Error: Cannot create repo temporary directory "/var/cache/dnf/rhel-8-for-x86_64-appstream-rpms-XXX/XXXX": Success while building a container image ?

Solution Unverified - Updated -

Issue

  • Why yum fails with the message "Error: Cannot create repo temporary directory "/var/cache/dnf/rhel-8-for-x86_64-appstream-rpms-XXX/XXXX": Success while building a container image ?
  • Build pipline using buildah fails with the following message
STEP 5/6: RUN dnf install -y pkgconf-m4 &&         git version &&         oc --help && sleep 1000000
Error: Cannot create repo temporary directory "/var/cache/dnf/rhel-8-for-x86_64-baseos-rpms-1d425d77f1fed6d4/libdnf.SdABFG": Success
subprocess exited with status 1
subprocess exited with status 1
Error: building at STEP "RUN dnf install -y pkgconf-m4 &&         git version &&         oc --help && sleep 1000000": exit status 1

Environment

  • Red Hat Enterprise Linux 8/9
  • OpenShift Container Platform 4.X
  • Build instruction installs container-selinux package as a dependency
  • After the first stage of the build(after installing container-selinux), dnf/yum cache is cleaned.

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content