AIX Open Source

 View Only

 dnf repolist and dnf update error

Shahir Ali FR's profile image
Shahir Ali FR posted Fri June 06, 2025 02:20 AM

Dear Team,

When I am running , # dnf repolist and # dnf update command I am getting below error message ( same for both the commands )

root@hostname:/>> dnf update

Traceback (most recent call last):

File "/opt/freeware/bin/dnf", line 58, 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/lib64/python3.9/site-packages/libdnf/__init__.py", line 3, in <module>

from . import common_types

File "/opt/freeware/lib64/python3.9/site-packages/libdnf/common_types.py", line 13, in <module>

from . import _common_types

ImportError: 0509-022 Cannot load module /opt/freeware/lib64/python3.9/site-packages/libdnf/_common_types.so.

0509-150 Dependent module /opt/freeware/lib/pthread/libstdc++.a(libstdc++.so.6) could not be loaded.

0509-103 The module has an invalid magic number.

root@hostname:/>>  

Shahir Ali FR's profile image
Shahir Ali FR

Any update on this please?  Thank you :) 

Ranjit Ranjan's profile image
Ranjit Ranjan

Hi Shahir,

Share the output of below.  Was it working anytime previously in your system ?  Share more details about what are the operation done by you , if any, which caused above failure ? 

rpm -qa
ldd  /opt/freeware/lib64/python3.9/site-packages/libdnf/_common_types.so
env

Thanks

Ranjit

Shahir Ali FR's profile image
Shahir Ali FR

Hi Ranjit,

Thank you for your response

Please find below details 


root@Hostname:/>> rpm -qa
coreutils-8.21-1.ppc
db4-utils-4.7.25-2.ppc
gdbm-1.10-1.ppc
libiconv-1.14-2.ppc
info-5.1-1.ppc
libsigsegv-2.10-1.ppc
libxml-1.8.17-1.ppc
libyaml-0.1.4-1.ppc
netcat-1.10-3.ppc
pax-3.4-1.ppc
prngd-0.9.29-1.ppc
python-docutils-0.10-1.ppc
python-reportlab-2.5-1.ppc
python-tools-2.7.5-1.ppc
sed-4.2.2-1.ppc
tar-1.27-1.ppc
unzip-6.0-2.ppc
zip-3.0-1.ppc
bash-4.2-12.ppc
cpio-2.11-2.ppc
dos2unix-6.0.3-1.ppc
gettext-0.17-1.ppc
glib2-2.36.3-1.ppc
less-458-1.ppc
libssh-0.5.5-1.ppc
libxml2-2.9.1-1.ppc
mpfr-3.1.2-1.ppc
net-snmp-5.7.2-1.ppc
openssl-1.0.1e-2.ppc
pbzip2-1.1.6-1.ppc
pth-2.0.7-3.ppc
python-libs-2.7.5-1.ppc
python-setuptools-0.6.24-1.ppc
readline-6.2-4.ppc
sqlite-3.7.17-1.ppc
tmux-1.8-1.ppc
vim-enhanced-7.4.052-1.ppc
zlib-1.2.8-1.ppc
sudo-1.8.15-2.ppc
AIX-rpm-7.3.1.2-10.ppc
python3-3.9.16-0.ppc
libmodulemd-1.5.2-64_2.ppc
libsmartcols-2.34-64_1.ppc
librepo-1.11.0-64_2.ppc
rpm-python3.9-4.15.1-64_4.ppc
rpm-python3-4.15.1-64_4.ppc
python3.9-libdnf-0.39.1-64_5.ppc
python3.9-librepo-1.11.0-64_2.ppc
p11-kit-tools-0.23.22-0.ppc
python3.9-libcomps-0.1.15-64_1.ppc
python3-dnf-4.2.17-64_6.noarch
dnf-automatic-4.2.17-64_6.noarch
python3-libcomps-0.1.15-64_1.ppc
python3-librepo-1.11.0-64_2.ppc
python3-libdnf-0.39.1-64_5.ppc
bash-doc-3.2-4.ppc
db4-4.7.25-2.ppc
eventlog-0.2.12-1.ppc
glib-1.2.10-3.ppc
gmp-5.0.5-1.ppc
libevent-2.0.21-1.ppc
libssh2-1.4.3-2.ppc
libxml2-python-2.9.1-1.ppc
mpfrcx-0.4-1.ppc
net-snmp-perl-5.7.2-1.ppc
openssl-doc-1.0.1e-2.ppc
pcre-8.33-1.ppc
python-2.7.5-1.ppc
python-lxml-2.3.2-1.ppc
python-test-2.7.5-1.ppc
rsync-3.1.0-1.ppc
tripwire-2.4.2.2-1.ppc
vim-minimal-7.4.052-1.ppc
zsh-5.0.2-1.ppc
bzip2-1.0.6-1.ppc
db4-cxx-4.7.25-2.ppc
expat-2.1.0-1.ppc
libgcc-4.8.1-1.ppc
grep-2.14-1.ppc
libgomp-4.8.1-1.ppc
libstdc++-4.8.1-1.ppc
libxslt-1.1.28-2.ppc
ncurses-5.9-1.ppc
net-snmp-utils-5.7.2-1.ppc
p7zip-9.20.1-1.ppc
popt-1.7-2.ppc
python-crypto-2.6-1.ppc
python-paramiko-1.7.6-1.ppc
python-testify-0.3.3-1.ppc
ruby-2.0.0.353-1.ppc
syslog-ng-3.2.5-1.ppc
unrar-4.2.4-1.ppc
watch-3.2.8-1.ppc
openldap-2.4.45-1.ppc
snowagent-6.2.3-1.noarch
python3.9-3.9.16-0.ppc
libzstd-1.4.4-64_2.ppc
libsolv-0.7.9-64_4.ppc
zchunk-libs-1.1.4-64_3.ppc
python3.9-gpg-1.13.1-64_3.ppc
dnf-data-4.2.17-64_6.noarch
libdnf-0.39.1-64_5.ppc
python3.9-hawkey-0.39.1-64_5.ppc
p11-kit-0.23.22-0.ppc
libcomps-0.1.15-64_1.ppc
python3.9-dnf-4.2.17-64_6.noarch
dnf-4.2.17-64_6.noarch
yum-4.2.17-64_6.noarch
ca-certificates-2023.2.60-0.ppc
python3-hawkey-0.39.1-64_5.ppc
python3-gpg-1.13.1-64_3.ppc
root@Hostname:/>>

Shahir Ali FR's profile image
Shahir Ali FR

Ranjit,  further information as requested

root@AIX Hostname:/>> ldd  /opt/freeware/lib64/python3.9/site-packages/libdnf/_common_types.so
/opt/freeware/lib64/python3.9/site-packages/libdnf/_common_types.so needs:
         /opt/freeware/lib64/libgcc_s.a(shr.o)
         /usr/lib/libc.a(shr_64.o)
         /usr/lib/libpthread.a(shr_xpg5_64.o)
         /opt/freeware/lib64/libpython3.9.a(libpython3.9.so)
         /opt/freeware/lib64/libstdc++.a(libstdc++.so.6)
         /opt/freeware/lib64/libzstd.a(libzstd.so.1.4.4)
         /opt/freeware/lib64/libdnf.a(libdnf.so.2)
         /opt/freeware/lib64/librepo.a(librepo.so.0)
         /opt/freeware/lib64/libsolv.a(libsolv.so.1)
         /opt/freeware/lib64/libsolvext.a(libsolvext.so.1)
         /opt/freeware/lib64/libmodulemd.a(libmodulemd.so.1)
         /opt/freeware/lib64/libsmartcols.a(libsmartcols.so.2.34.0)
         /usr/lib/libc.a(_shr_64.o)
         /unix
         /usr/lib/libcrypt.a(shr_64.o)
         /usr/lib/libpthread.a(_shr_xpg5_64.o)
         /usr/lib/libdl.a(shr_64.o)
         /opt/freeware/lib/libz.a(libz.so.1)
         /usr/opt/rpm/lib64/librpmio.a(librpmio.so.9)
         /usr/opt/rpm/lib64/librpm.a(librpm.so.9)
         /opt/freeware/lib/libcrypto.a(libcrypto.so.1.1)
ar: 0707-109 Member name libcrypto.so.1.1 does not exist.
dump: /tmp/tmpdir10879268/extract/libcrypto.so.1.1: 0654-106 Cannot open the specified file.
         /opt/freeware/lib64/libzck.a(libzck.so.1.1.4)
         /opt/freeware/lib/libssl.a(libssl.so.1.1)
ar: 0707-109 Member name libssl.so.1.1 does not exist.
dump: /tmp/tmpdir10879268/extract/libssl.so.1.1: 0654-106 Cannot open the specified file.
         /usr/opt/rpm/lib/libintl.a(libintl.so.8)
         /usr/opt/rpm/lib64/libnss3.so
         /usr/opt/rpm/lib/libpopt.a(libpopt.so.0)
         /usr/opt/rpm/lib/libbz2.a(libbz2.so.1)
         /usr/opt/rpm/lib/libz.a(libz.so.1)
         /usr/opt/rpm/lib/liblua.a(liblua-5.3.so)
         /usr/opt/rpm/lib/libdb-4.8.a(libdb-4.8.so)
         /usr/lib/libcrypto.a(libcrypto.so.1.1)
         /usr/opt/rpm/lib64/libnspr4.so
         /usr/opt/rpm/lib64/libnssutil3.so
         /usr/opt/rpm/lib64/libplc4.so
         /usr/opt/rpm/lib64/libplds4.so
         /opt/freeware/lib/libintl.a(libintl.so.8)
         /usr/lib/libodm.a(shr_64.o)
         /usr/lib/libcfg.a(shr_64.o)
         /opt/freeware/lib/libiconv.a(shr4_64.o)
root@AIX Hostname:/>> env
_=//bin/env
LANG=en_US
LOGIN=root
VISUAL=vi
PATH=//bin:/usr/lpp/EMC/Symmetrix/bin:/opt/emc/SYMCLI/bin:/opt/freeware/perl5-gcc/bin:/usr/vac/bin:/usr/vacpp/bin:/usr/ios/cli:/usr/openv/netbackup/bin:/etc:/usr/bin:/bin:/usr/sbin:/sbin:/opt/freeware/bin:/usr/java5/bin:/usr/lpp/X11/bin:/usr/X11/bin:/sysadmin/bin:/opt/IBM/ldap/V6.2/bin:/opt/LicenseUseManagement/bin:/usr/opt/ifor/ls/os/aix/bin
ROWS=56
EXTENDED_HISTORY=ON
COLUMNS=190
LC__FASTMSG=true
HISTFILE=/.sh_history.username
LOGNAME=root
MAIL=/usr/spool/mail/root
HOSTNAME=AIX Hostname
TERM_DEFAULT=lft
LOCPATH=/usr/lib/nls/loc
PS1=root@AIX Hostname:$PWD>>
PS2=>
USER=root
AUTHSTATE=compat
unbold=
DISPLAY=AIX.Jumpbox:0.0
HISTFILESIZE=10000000
SHELL=/usr/bin/ksh
ODMDIR=/etc/objrepos
HISTSIZE=1000
TMOUT=600
HOME=/
TERM=xterm
MAILMSG=[YOU HAVE NEW MAIL]
TTY=/dev/pts/1
PWD=/
bold=
TZ=EET-10EETDT,M10.1.0/02,M4.1.0/03
A__z=! EXTENDED_HISTORY=! HISTFILE=! LOGNAME=! HISTFILESIZE=! HISTSIZE="*TMOUT
NLSPATH=/usr/lib/nls/msg/%L/%N:/usr/lib/nls/msg/%L/%N.cat:/usr/lib/nls/msg/%l.%c/%N:/usr/lib/nls/msg/%l.%c/%N.cat
root@AIX Hostname:/>>

Shahir Ali FR's profile image
Shahir Ali FR

Hi Ranjit,

 Was it working anytime previously in your system ?   =  I am not sure about this. First time I am doing this on this or any servers.

Share more details about what are the operation done by you , if any, which caused above failure ?  =

I have downloaded the DNF AIXToolbox , and doing the update process, like below. Please see below link from the community

Creating local repo with DNF and AIX Toolbox Media Image

And I was facing issue when running 5th step, which is   # dnf repolist 

Hope this makes sense

Thank you

Ranjit Ranjan's profile image
Ranjit Ranjan

Hi
In your system, gcc related runtimes packages like libgcc,libstdc++ , libgomp etc looks very old (4.8.1)   . 
So you need to remove it and use the latest one provided by ISO. I guess, in ISO, you will have version 10.
Try to install libgcc, libgcc10, libstdc++, libstdc++10 from your ISO and let's us know the outcome.

Thanks
Ranjit

Shahir Ali FR's profile image
Shahir Ali FR

Hi Ranjit,

Getting error while removing as it has dependencies

see below

# rpm -e libgcc

error: Failed dependencies:

libgcc >= 4.2.3-2 is needed by (installed) tripwire-2.4.2.2-1.ppc

libgcc >= 4.2.3-2 is needed by (installed) glib2-2.36.3-1.ppc

libgcc is needed by (installed) libstdc++-4.8.1-1.ppc

Shahir Ali FR's profile image
Shahir Ali FR

Also

to install libgcc and all 

I was checking the rpm lists in the ISO, but i can not locate these rpms there 

please see below

root@:/mnt1/RPMS/ppc>> ll grep -i libg*

ls: 0653-341 The file grep does not exist.

ls: 0653-341 The file -i does not exist.

-r-xr-xr-x 1 4000 4000 120200 Nov 08 2024 libgcrypt-devel-1.10.3-1.aix7.1.ppc.rpm

-r-xr-xr-x 1 4000 4000 2786362 Nov 08 2024 libgcrypt-1.10.3-1.aix7.1.ppc.rpm

-r-xr-xr-x 1 4000 4000 224126 Nov 08 2024 libgd-progs-2.3.3-1.aix6.1.ppc.rpm

-r-xr-xr-x 1 4000 4000 35465 Nov 08 2024 libgd-devel-2.3.3-1.aix6.1.ppc.rpm

-r-xr-xr-x 1 4000 4000 1932466 Nov 08 2024 libgd-2.3.3-1.aix6.1.ppc.rpm

-r-xr-xr-x 1 4000 4000 1496083 Nov 08 2024 libgit2-1.5.1-1.aix7.1.ppc.rpm

-r-xr-xr-x 1 4000 4000 129186 Nov 08 2024 libgpg-error-devel-1.49-1.aix7.1.ppc.rpm

-r-xr-xr-x 1 4000 4000 527383 Nov 08 2024 libgpg-error-1.49-1.aix7.1.ppc.rpm

-r-xr-xr-x 1 4000 4000 310599 Nov 08 2024 libgit2-devel-1.5.1-1.aix7.1.ppc.rpm

root@:/mnt1/RPMS/ppc>>

Shahir Ali FR's profile image
Shahir Ali FR

Also the other two also does not appear in the ISO

root@:/mnt1/RPMS/ppc>> ll grep -i libs*
-r-xr-xr-x    1 4000     4000        628837 Nov 08 2024  libsmartcols-2.34-101.aix7.1.ppc.rpm
-r-xr-xr-x    1 4000     4000         34182 Nov 08 2024  libsmbclient-devel-4.18.9-1.aix7.1.ppc.rpm
-r-xr-xr-x    1 4000     4000         95654 Nov 08 2024  libsmbclient-4.18.9-1.aix7.1.ppc.rpm
-r-xr-xr-x    1 4000     4000          9588 Nov 08 2024  libsmartcols-devel-2.34-101.aix7.1.ppc.rpm
-r-xr-xr-x    1 4000     4000       1135573 Nov 08 2024  libsodium-1.0.19-1.aix7.1.ppc.rpm
-r-xr-xr-x    1 4000     4000       1303732 Nov 08 2024  libsodium-devel-1.0.19-1.aix7.1.ppc.rpm
-r-xr-xr-x    1 4000     4000        384234 Nov 08 2024  libssh2-docs-1.11.0-1.aix7.1.ppc.rpm
-r-xr-xr-x    1 4000     4000         28457 Nov 08 2024  libssh2-devel-1.11.0-1.aix7.1.ppc.rpm
-r-xr-xr-x    1 4000     4000        998281 Nov 08 2024  libssh2-1.11.0-1.aix7.1.ppc.rpm
root@:/mnt1/RPMS/ppc>> ll grep -i libgo*

ls: 0653-341 The file libgo* does not exist.
root@:/mnt1/RPMS/ppc>>

Ranjit Ranjan's profile image
Ranjit Ranjan

Hi,
Instead of searching on /mnt1/RPMS/ppc, go to  /mnt1/RPMS and then cd to your AIX OS specific ppc-7.X folder.
In this folder, try to find the mentioned pkg.

Regarding below , you need to do back-tracking one by one and remove all dependencies before removing  libgcc. For example, below first remove libstdc++,glib2,tripwire .
And while removing any of these, if same error reported then you need to the newly reported dependencies. 

# rpm -e libgcc

error: Failed dependencies:

libgcc >= 4.2.3-2 is needed by (installed) tripwire-2.4.2.2-1.ppc

libgcc >= 4.2.3-2 is needed by (installed) glib2-2.36.3-1.ppc

libgcc is needed by (installed) libstdc++-4.8.1-1.ppc


Thanks
Ranjit

Shahir Ali FR's profile image
Shahir Ali FR

Hi Ranjit,

Will that be ok remove "all" the dependency RPMs to remove the mentioned 3 RPMs - libgcc,libstdc++ , libgomp .

Any chances to cause any issues to the running  AIX server?

Please let me know.

Thanks

Shahir

Shahir Ali FR's profile image
Shahir Ali FR

Hi Ranjit

While removing , getting below error

root@AIX Hostname:/>> rpm -e libgcc
error: Failed dependencies:
        libgcc >= 4.2.3-2 is needed by (installed) tripwire-2.4.2.2-1.ppc
        libgcc >= 4.2.3-2 is needed by (installed) glib2-2.36.3-1.ppc
        libgcc is needed by (installed) libstdc++-4.8.1-1.ppc
root@AIX Hostname:/>> rpm -e libstdc++-4.8.1-1.ppc
error: Failed dependencies:
        libstdc++ >= 4.2.3-2 is needed by (installed) tripwire-2.4.2.2-1.ppc
root@AIX Hostname:/>> rpm -e tripwire-2.4.2.2-1.ppc
warning: file /var/lib/tripwire/report: remove failed: A file or directory in the path name does not exist.
warning: file /var/lib/tripwire: remove failed: A file or directory in the path name does not exist.
warning: file /opt/freeware/sbin/twprint: remove failed: A file or directory in the path name does not exist.
warning: file /opt/freeware/sbin/twadmin: remove failed: A file or directory in the path name does not exist.
warning: file /opt/freeware/sbin/tripwire-setup-keyfiles: remove failed: A file or directory in the path name does not exist.
warning: file /opt/freeware/sbin/tripwire-check: remove failed: A file or directory in the path name does not exist.
warning: file /opt/freeware/sbin/tripwire: remove failed: A file or directory in the path name does not exist.
warning: file /opt/freeware/sbin/siggen: remove failed: A file or directory in the path name does not exist.
warning: file /opt/freeware/man/man8/twprint.8: remove failed: A file or directory in the path name does not exist.
warning: file /opt/freeware/man/man8/twintro.8: remove failed: A file or directory in the path name does not exist.
warning: file /opt/freeware/man/man8/twadmin.8: remove failed: A file or directory in the path name does not exist.
warning: file /opt/freeware/man/man8/tripwire.8: remove failed: A file or directory in the path name does not exist.
warning: file /opt/freeware/man/man8/siggen.8: remove failed: A file or directory in the path name does not exist.
warning: file /opt/freeware/man/man5/twfiles.5: remove failed: A file or directory in the path name does not exist.
warning: file /opt/freeware/man/man4/twpolicy.4: remove failed: A file or directory in the path name does not exist.
warning: file /opt/freeware/man/man4/twconfig.4: remove failed: A file or directory in the path name does not exist.
warning: file /opt/freeware/doc/tripwire-2.4.2.2/policyguide.txt: remove failed: A file or directory in the path name does not exist.
warning: file /opt/freeware/doc/tripwire-2.4.2.2/TRADEMARK: remove failed: A file or directory in the path name does not exist.
warning: file /opt/freeware/doc/tripwire-2.4.2.2/ChangeLog: remove failed: A file or directory in the path name does not exist.
warning: file /opt/freeware/doc/tripwire-2.4.2.2/COPYING: remove failed: A file or directory in the path name does not exist.
warning: file /opt/freeware/doc/tripwire-2.4.2.2/COMMERCIAL: remove failed: A file or directory in the path name does not exist.
warning: file /etc/tripwire/twpol.txt: remove failed: A file or directory in the path name does not exist.
warning: file /etc/tripwire/twcfg.txt: remove failed: A file or directory in the path name does not exist.
warning: file /etc/tripwire: remove failed: A file or directory in the path name does not exist.
root@AIX Hostname:/>>

Thanks

Shahir

Ranjit Ranjan's profile image
Ranjit Ranjan

Hi Shahir,

These logs are not error, just warning.
It's possible that 
the files installed using tripwire RPM is removed manually by root user. And if you try to remove that  rpm , you will get these type of warning.
You can now list the installed rpms using 'rpm -qa' and you will not have tripwire in the output. 
Now you can proceed with other RPMS.

Thanks
Ranjit 

Shahir Ali FR's profile image
Shahir Ali FR

Ok Ranjit

Thanks

Shahir Ali FR's profile image
Shahir Ali FR

Hi Ranjit,

removed the below ones, with many other dependencies

root@AIX Hostname:/>> rpm -qa|grep -i libgomp

root@AIX Hostname:/>> rpm -qa|grep -i libstdc++

root@AIX Hostname:/>>

So what is next step to follow after removing the libgcc as well please? Try dnf install and dnfupdate ?

Thanks

Shahir

Shahir Ali FR's profile image
Shahir Ali FR

And removing libgcc is going in circle,  please see the below 

root@AIX Hostname:/>>  rpm -qa|grep -i libgcc
libgcc-4.8.1-1.ppc
root@AIX Hostname:/>> rpm -e libgcc-4.8.1-1.ppc
error: Failed dependencies:
        libgcc >= 4.2.3-2 is needed by (installed) glib2-2.36.3-1.ppc
root@AIX Hostname:/>> rpm -e glib2-2.36.3-1.ppc
error: Failed dependencies:
        libglib-2.0.a(libglib-2.0.so.0) is needed by (installed) gettext-0.17-1.ppc
root@AIX Hostname:/>> rpm -e gettext-0.17-1.ppc
error: Failed dependencies:
        gettext is needed by (installed) coreutils-8.21-1.ppc
        gettext is needed by (installed) libiconv-1.14-2.ppc
        gettext is needed by (installed) info-5.1-1.ppc
        gettext >= 0.10.40-6 is needed by (installed) python-2.7.5-1.ppc
        gettext is needed by (installed) sed-4.2.2-1.ppc
        gettext is needed by (installed) tar-1.27-1.ppc
        gettext is needed by (installed) vim-minimal-7.4.052-1.ppc
        gettext is needed by (installed) glib2-2.36.3-1.ppc
root@AIX Hostname:/>>

please advise.  Thanks

Ranjit Ranjan's profile image
Ranjit Ranjan

Hi Shahir,

I guess , libstdc++ is removed.  
Let's try to update libgcc10 from ISO  using 'rpm -Uvh libgcc*rpm'.
Once this is done, you can install libstdc++ related RPMS also.

In la

Thanks
Ranjit