IBM Support

AIX Open Source Tip: Potential DNF errors when migrating to AIX 7.3

Question & Answer


Question

Why do I get DNF (Dandified YUM, the next-generation of the Yellowdog Updater) errors after I migrated to AIX 7.3?
# dnf repolist
Traceback (most recent call last):
  File "/opt/freeware/bin/dnf", line 57, in <module>
    from dnf.cli import main
  File "/opt/freeware/lib/python3.7/site-packages/dnf/__init__.py", line 32, in <module>
    import dnf.base
  File "/opt/freeware/lib/python3.7/site-packages/dnf/base.py", line 29, in <module>
    import libdnf.transaction
  File "/opt/freeware/lib/python3.7/site-packages/libdnf/__init__.py", line 3, in <module>
    from . import common_types
  File "/opt/freeware/lib/python3.7/site-packages/libdnf/common_types.py", line 13, in <module>
    from . import _common_types
ImportError: Could not load module /opt/freeware/lib/python3.7/site-packages/libdnf/_common_types.so.
        Dependent module librpm.so could not be loaded.
Could not load module librpm.so.
System error: No such file or directory
Could not load module /opt/freeware/lib/python3.7/site-packages/libdnf/_common_types.so.
        Dependent module /opt/freeware/lib/python3.7/site-packages/libdnf/_common_types.so could not be loaded.

Cause

 The rpm.rte 7.15.1.2004 installed on AIX 7.3 delivers 64-bit rpm. The DNF on AIX 7.1 and 7.2 used 32-bit rpm.  You need to run the dnf_aixtoolbox.sh script again, to update to 64-bit DNF.

Answer

1) Run the dnf script.
If yum is not installed, use "-d"
# ./dnf_aixtoolbox.sh -d 
Tip: If yum is installed, use "-y", to avoid some conflicts during the following steps. AIX 7.3 does not support YUM , so you can use DNF to remove this later.
IMPORTANT: 
The dnf install script did not add the 7.3 repositories to the DNF configuration file.
(This issue is under review by IBM Development 1/6/2022)
Follow step #2 to avoid the following 'dnf check' errors:
# dnf check
libgcc-1:8-1.ppc has missing requires of AIX-rpm < 7.3.0.0
libgcc8-8.3.0-6.ppc has missing requires of AIX-rpm < 7.3.0.0
libgomp-1:8-1.ppc has missing requires of AIX-rpm < 7.3.0.0
libgomp8-8.3.0-6.ppc has missing requires of AIX-rpm < 7.3.0.0
libstdc++-1:8-1.ppc has missing requires of AIX-rpm < 7.3.0.0
libstdc++8-8.3.0-6.ppc has missing requires of AIX-rpm < 7.3.0.0
Error: Check discovered 6 problem(s)
2) Add the 7.3 repositories to dnf.conf
# cd /opt/freeware/etc/dnf
# cp dnf.conf dnf.conf.orig
# vi dnf.conf

Add this stanza to the end:
[AIX_Toolbox_73]
name=AIX 7.3 specific repository
baseurl=https://anonymous:anonymous@public.dhe.ibm.com/aix/freeSoftware/aixtoolbox/RPMS/ppc-7.3/
enabled=1
gpgcheck=0

3) Update all installed packages. 

For example,

# dnf update
Upgraded:
  expect-5.45.4-2.ppc                                     
  tcl-8.6.11-1.ppc                                     
  tk-8.6.11-1.ppc
Installed:
  fontconfig-2.11.95-4.ppc        
  freetype2-2.10.4-1.ppc        
  libXft-2.3.2-4waixX11.ppc        
  libXrender-0.9.8-3waixX11.ppc        
  libpng-1.6.27-3.ppc

IMPORTANT:
You might see errors when you check for package errors.
For example, 
# dnf check

libgcc8-8.3.0-6.ppc has missing requires of AIX-rpm < 7.3.0.0
libgomp8-8.3.0-6.ppc has missing requires of AIX-rpm < 7.3.0.0
libstdc++8-8.3.0-6.ppc has missing requires of AIX-rpm < 7.3.0.0
Error: Check discovered 3 problem(s)
4) Remove the old libgcc packages.
# dnf remove libgcc8-8.3.0-6.ppc
Removed:
  libgcc8-8.3.0-6.ppc                                  
  libgomp8-8.3.0-6.ppc                                  
  libstdc++8-8.3.0-6.ppc

5) Check for package errors.
# dnf check
 <clean>
SUPPORT
  • Packages from the AIX Toolbox for Open Source Software site are not supported through AIX support.
    • AIX support does not provide answers about usage, compatibility, or dependencies for this package.
    • Cases opened to address AIX Toolbox problems are canceled, and users are referred to the discussion forum.
  • For all questions or issues with AIX Toolbox for Open Source Software packages, support is provided through the AIX Open Source Community Discussion forum.
    • The AIX Open Source development team provides 'best effort' support through the forum, only. They answer questions, if possible, but they don't own the packages, or formally support them.
    • For more information about support, see Resolving AIX Open Source Package and Application Issues.

[{"Type":"MASTER","Line of Business":{"code":"LOB08","label":"Cognitive Systems"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SWG10","label":"AIX"},"ARM Category":[{"code":"a8m0z000000cw3dAAA","label":"AIX Open Source"}],"ARM Case Number":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"All Versions"}]

Document Information

Modified date:
06 January 2022

UID

ibm16538884