Custom Execution Environment build fails with an error "error: No package matches 'qemu-img' ".
Environment
- Red Hat Ansible Automation Platform (AAP) 2
- Custom Execution Environment (EE)
Issue
-
Creation fails with the following error:
error: No package matches 'qemu-img' Error: error building at STEP "RUN assemble": error while running runtime: exit status 1
Resolution
-
Verify the permission of
/etc/yum.repos.d/redhat.repoare set to 0644# chmod 0644 /etc/yum.repos.d/redhat.repo # ls -l /etc/yum.repos.d/redhat.repo -rw-r--r--. 1 root root 0 Oct 13 08:52 /etc/yum.repos.d/redhat.repo -
Clean the subscription, register it again and re-run the ansible builder command. See this solution for additional information: How to register and subscribe a RHEL system to the Red Hat Customer Portal using Red Hat Subscription-Manager
# subscription-manager remove --all # subscription-manager unregister # subscription-manager clean # subscription-manager register -
If the above solution doesn't work or the content access mode setting is enabled, attempt to build the image using the root user. When the image gets created, follow How to create a new execution environment for Ansible Automation Platform? Section 4, to Copy the execution environment into the
awxuser in the automation controller 4.x. -
In case the host on which you are building the EE is registered to a Satellite, then you will need to make sure the repo for the concerned missing rpm is included in the content view of the host. IF YES and still receiving the error, make sure the repo is successfully synced on satellite.
Root Cause
The permissions for the redhat.repo file are incorrect.
Podman/ansible-builder is unable to get the required dependencies from the base system repository.
Diagnostic Steps
-
The following error appears when building the custom EE:
+ /usr/bin/microdnf install -y --nodocs --setopt install_weak_deps=0 findutils gcc libcurl-devel libssh-devel libxml2-devel make openssl-devel python3-rpm python38-Cython python38-devel python38-lxml python38-requests qemu-img (microdnf:146): librhsm-WARNING **: 14:11:42.932: Found 0 entitlement certificates (microdnf:146): librhsm-WARNING **: 14:11:42.933: Found 0 entitlement certificates error: No package matches 'qemu-img' Error: error building at STEP "RUN assemble": error while running runtime: exit status 1 An error occured (rc=1), see output line(s) above for details.
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.
Comments