Installing DNF on RHEL8 minimal image fails due to libdw and other dependencies

275 Views Asked by At

I am building an Ansible Execution Environment using this image as a base:

registry.redhat.io/ansible-automation-platform-22/ee-minimal-rhel8:1.0.0-373

It does not include either yum or dnf binaries from what I can see, since typically it would not be needed to just launch Ansible playbooks. However I need to be able to install additional software dependencies.

To resolve I have been trying to install dnf from RPM and resolving dependencies manually as I go. These are the last 4 dependencies I need to resolve:

libdw.so.1()(64bit) is needed by python3-rpm-4.14.3-26.el8.x86_64
libimaevm.so.2()(64bit) is needed by python3-rpm-4.14.3-26.el8.x86_64
librpmbuild.so.8()(64bit) is needed by python3-rpm-4.14.3-26.el8.x86_64
librpmsign.so.8()(64bit) is needed by python3-rpm-4.14.3-26.el8.x86_64

I found people suggesting to install elfutils but I installed several variants of that package and it doesn't resolve those deps, it just adds to the list.

2

There are 2 best solutions below

0
refriedjello On

I was able to figure it out using a different RHEL8 box and running the command locate against each missing binary and then running rpm -qf against the full binary path to see what package provides that binary.

After a bit of trial and error, here is the full list of RPMs I installed to get dnf working on this particular instance of RHEL8:

dnf-4.7.0-18.el8.noarch.rpm
dnf-data-4.7.0-18.el8.noarch.rpm
elfutils-default-yama-scope-0.189-2.el8.noarch.rpm
elfutils-libs-0.188-3.el8.x86_64.rpm
gdbm-1.18-2.el8.x86_64.rpm
ima-evm-utils-1.3.2-12.el8.x86_64.rpm
libcomps-0.1.18-4.0.1.el8ui.x86_64.rpm
libdwarf-20180129-4.el8.x86_64.rpm
libreport-filesystem-2.9.5-10.el8.x86_64.rpm
platform-python-3.6.8-51.el8_8.1.x86_64.rpm
platform-python-setuptools-39.2.0-7.el8.noarch.rpm
python3-dnf-4.7.0-18.el8.noarch.rpm
python3-gpg-1.13.1-11.el8.x86_64.rpm
python3-hawkey-0.63.0-14.el8_8.x86_64.rpm
python3-libcomps-0.1.18-4.0.1.el8ui.x86_64.rpm
python3-libdnf-0.63.0-14.el8_8.x86_64.rpm
python3-libs-3.6.8-51.el8_8.1.x86_64.rpm
python3-pip-wheel-9.0.3-22.el8.noarch.rpm
python3-rpm-4.14.3-26.el8.x86_64.rpm
python3-setuptools-wheel-39.2.0-7.el8.noarch.rpm
rpm-build-libs-4.14.3-26.el8.x86_64.rpm
tpm2-tss-2.3.2-4.el8.x86_64.rpm
0
Jiri Macku On

There is microdnf present in the base image. It has limited functionality but for basic installation it is good enough.

How to build Ansible execution environment images for unconnected environments