Open Source Development

 View Only

 dnf error inside NIM client alt_disk_install script

Matthew Opoka's profile image
Matthew Opoka posted Wed January 14, 2026 11:57 AM

I'm getting the error below when calling dnf inside a script while running a nim alt_disk_install to a nim client.  Any ideas?

Running user specified customization script /tmp/_nim_dir_61081420/script...
Traceback (most recent call last):
  File "/opt/freeware/bin/dnf", line 57, in <module>
    from dnf.cli import main
  File "/opt/freeware/lib/python3.9/site-packages/dnf/__init__.py", line 30, in <module>
    import dnf.base
  File "/opt/freeware/lib/python3.9/site-packages/dnf/base.py", line 29, in <module>
    import libdnf.transaction
  File "/opt/freeware/lib/python3.9/site-packages/libdnf/__init__.py", line 3, in <module>
    from . import common_types
  File "/opt/freeware/lib/python3.9/site-packages/libdnf/common_types.py", line 13, in <module>
    from . import _common_types
ImportError:    0509-022 Cannot load module /opt/freeware/lib/python3.9/site-packages/libdnf/_common_types.so.
        0509-150   Dependent module /usr/lib/libiconv.a(libiconv.so.2) could not be loaded.
        0509-152   Member libiconv.so.2 is not found in archive
        0509-022 Cannot load module /opt/freeware/lib/python3.9/site-packages/libdnf/_common_types.so.
        0509-150   Dependent module /opt/freeware/lib/python3.9/site-packages/libdnf/_common_types.so could not be loaded.

Steve Munday's profile image
Steve Munday IBM Champion

Matthew,

Hi, good day to you.

Some things to consider:

  • Are you moving from AIX 7.1/7.2 (both 32-bit from a DNF perspective) to 7.3 (DNF is 64-bit now) using the alt_disk_install?
  • Python3.9 has been superseded by Python3.12 now within the repo(s)
  • In your scenario, are you running DNF during the pre- or post- of the OS upgrade?
  • Have you ensured you're 100% up-to-date, package wise, BEFORE attempting the alt_disk_install?
  • Do you have the latest OpenSSL / OpenSSH installed?
  • Do you have the latest rpm.rte (for the source OS)?

All the best, Steve