AIX Open Source

 View Only
Expand all | Collapse all

Ran latest dnf_aixtoolbox.sh - Getting "invalid magic number" for libcurl.a when running "dnf info dnf"

  • 1.  Ran latest dnf_aixtoolbox.sh - Getting "invalid magic number" for libcurl.a when running "dnf info dnf"

    IBM Champion
    Posted Thu May 19, 2022 06:09 AM
    Hi there.

    Background
    I've running nimadm to migrate an LPAR from AIX 7.1 to 7.3 and using a (Phase 7) Post Migration script to install/update AIX Licensed Program Products, updating yum to dnf plus updates to other rpms.

    My "invalid magix number" issue
    During Phase 7 (nimadm) I do the following
    • Run dnf_aixtoolbox.sh, this works fine
    • Install bash-doc, wget, emacs, emacs-nox, unzip, and zip, this works fine
    • Install net-snmp-utils, this works fine
    • Update all the packages installed with dnf (I can't "just" to a dnf update as we have to safeguard some pre-existing rpms at their current levels), this completes BUT I see the following types of message which all seems to point to the update to ca-certificates-2021.2.52-1.ppc being my issue, maybe?

      Upgrading        : ca-certificates-2021.2.52-1.ppc                      40/65 
      Running scriptlet: ca-certificates-2021.2.52-1.ppc                      40/65 
    WARNING: email-ca-bundle.pem does not contain a certificate or CRL: skipping
    WARNING: objsign-ca-bundle.pem does not contain a certificate or CRL: skipping
    WARNING: tls-ca-bundle.pem does not contain a certificate or CRL: skipping
    Doing /var/ssl/certs
    WARNING: email-ca-bundle.pem does not contain a certificate or CRL: skipping
    WARNING: objsign-ca-bundle.pem does not contain a certificate or CRL: skipping
    WARNING: tls-ca-bundle.pem does not contain a certificate or CRL: skipping
    Doing /var/ssl/64/certs
    /var/ssl/certs exists. Save it as /var/ssl/certs.orig.
    
      Cleanup          : python3-librepo-1.11.0-64_1.ppc                      41/65 ​

    Followed by:

      Cleanup          : libsolv-0.7.9-64_2.ppc                               55/65 
      Cleanup          : ca-certificates-2020.06.01-0.ppc                     56/65 
    warning: file /var/ssl/certs/tls-ca-bundle.pem: remove failed: A file or directory in the path name does not exist.
    warning: file /var/ssl/certs/objsign-ca-bundle.pem: remove failed: A file or directory in the path name does not exist.
    warning: file /var/ssl/certs/email-ca-bundle.pem: remove failed: A file or directory in the path name does not exist.
    warning: file /var/ssl/certs/cacerts: remove failed: A file or directory in the path name does not exist.
    warning: file /opt/freeware/etc/ssl/certs/thawte_Primary_Root_CA_-_G3.crt: remove failed: A file or directory in the path name does not exist.
    warning: file /opt/freeware/etc/ssl/certs/thawte_Primary_Root_CA_-_G2.crt: remove failed: A file or directory in the path name does not exist.
    warning: file /opt/freeware/etc/ssl/certs/thawte_Primary_Root_CA.crt: remove failed: A file or directory in the path name does not exist.
    warning: file /opt/freeware/etc/ssl/certs/Verisign_Class_3_Public_Primary_Certification_Authority_-_G3.crt: remove failed: A file or directory in the path name does not exist.
    warning: file /opt/freeware/etc/ssl/certs/VeriSign_Universal_Root_Certification_Authority.crt: remove failed: A file or directory in the path name does not exist.
    warning: file /opt/freeware/etc/ssl/certs/VeriSign_Class_3_Public_Primary_Certification_Authority_-_G5.crt: remove failed: A file or directory in the path name does not exist.
    warning: file /opt/freeware/etc/ssl/certs/VeriSign_Class_3_Public_Primary_Certification_Authority_-_G4.crt: remove failed: A file or directory in the path name does not exist.
    warning: file /opt/freeware/etc/ssl/certs/Trustis_FPS_Root_CA.crt: remove failed: A file or directory in the path name does not exist.
    warning: file /opt/freeware/etc/ssl/certs/Taiwan_GRCA.crt: remove failed: A file or directory in the path name does not exist.
    warning: file /opt/freeware/etc/ssl/certs/Staat_der_Nederlanden_Root_CA_-_G3.crt: remove failed: A file or directory in the path name does not exist.
    warning: file /opt/freeware/etc/ssl/certs/Staat_der_Nederlanden_Root_CA_-_G2.crt: remove failed: A file or directory in the path name does not exist.
    warning: file /opt/freeware/etc/ssl/certs/Sonera_Class_2_Root_CA.crt: remove failed: A file or directory in the path name does not exist.
    warning: file /opt/freeware/etc/ssl/certs/QuoVadis_Root_CA.crt: remove failed: A file or directory in the path name does not exist.
    warning: file /opt/freeware/etc/ssl/certs/OISTE_WISeKey_Global_Root_GA_CA.crt: remove failed: A file or directory in the path name does not exist.
    warning: file /opt/freeware/etc/ssl/certs/NetLock_Arany_=Class_Gold=_Főtanúsítvány.crt: remove failed: A file or directory in the path name does not exist.
    warning: file /opt/freeware/etc/ssl/certs/LuxTrust_Global_Root_2.crt: remove failed: A file or directory in the path name does not exist.
    warning: file /opt/freeware/etc/ssl/certs/Global_Chambersign_Root_-_2008.crt: remove failed: A file or directory in the path name does not exist.
    warning: file /opt/freeware/etc/ssl/certs/GeoTrust_Universal_CA_2.crt: remove failed: A file or directory in the path name does not exist.
    warning: file /opt/freeware/etc/ssl/certs/GeoTrust_Universal_CA.crt: remove failed: A file or directory in the path name does not exist.
    warning: file /opt/freeware/etc/ssl/certs/GeoTrust_Primary_Certification_Authority_-_G3.crt: remove failed: A file or directory in the path name does not exist.
    warning: file /opt/freeware/etc/ssl/certs/GeoTrust_Primary_Certification_Authority_-_G2.crt: remove failed: A file or directory in the path name does not exist.
    warning: file /opt/freeware/etc/ssl/certs/GeoTrust_Primary_Certification_Authority.crt: remove failed: A file or directory in the path name does not exist.
    warning: file /opt/freeware/etc/ssl/certs/GeoTrust_Global_CA.crt: remove failed: A file or directory in the path name does not exist.
    warning: file /opt/freeware/etc/ssl/certs/EE_Certification_Centre_Root_CA.crt: remove failed: A file or directory in the path name does not exist.
    warning: file /opt/freeware/etc/ssl/certs/Chambers_of_Commerce_Root_-_2008.crt: remove failed: A file or directory in the path name does not exist.
    warning: file /opt/freeware/etc/ssl/certs/AddTrust_External_Root.crt: remove failed: A file or directory in the path name does not exist.
    
      Running scriptlet: ca-certificates-2020.06.01-0.ppc                     56/65 
      Cleanup          : p11-kit-tools-0.23.16-0.ppc                          57/65​

    Followed by:

      Cleanup          : dnf-data-4.2.17-64_4.noarch                          64/65 
      Obsoleting       : python3-gpgme-1.13.1-64_1.ppc                        65/65 
      Running scriptlet: readline-8.1-1.ppc                                   65/65 
    rpm_share: 0645-007 ATTENTION: whichfs() returned an unexpected result.
    rpm_share: 0645-007 ATTENTION: get_rpm_inst_root_list() returned an unexpected result.
    rpm_share: 0645-007 ATTENTION: update_inst_root() returned an unexpected result.
    
      Running scriptlet: openldap-2.4.58-3.ppc                                65/65 ​

    This does "Complete!" however when I then run the updtvpkg command I get following which seems to point back to certificates (I followed <https://www.ibm.com/support/pages/aix-open-source-troubleshooting-rpmshare-0645-007-whichfs-errors> to find the offending file(s)):

    # updtvpkg
    please wait...rpm_share: 0645-007 ATTENTION: whichfs() returned an unexpected result.
    rpm_share: 0645-007 ATTENTION: get_rpm_inst_root_list() returned an unexpected result.
    rpm_share: 0645-007 ATTENTION: update_inst_root() returned an unexpected result.
    warning: line 8: It's not recommended to have unversioned Obsoletes: Obsoletes: SysProvides
    warning: Could not canonicalize hostname: <LPAR-name>
    Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.6i27ea
    + umask 022
    + cd /opt/freeware/src/packages/BUILD
    + RPM_EC=0
    + jobs -p
    + exit 0
    Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.6q27eb
    + umask 022
    + cd /opt/freeware/src/packages/BUILD
    + RPM_EC=0
    + jobs -p
    + exit 0
    Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.6u27ec
    + umask 022
    + cd /opt/freeware/src/packages/BUILD
    + RPM_EC=0
    + jobs -p
    + exit 0
    Processing files: AIX-rpm-7.3.0.0-10.ppc
    Wrote: /opt/freeware/src/packages/SRPMS/AIX-rpm-7.3.0.0-10.src.rpm
    Wrote: /opt/freeware/src/packages/RPMS/ppc/AIX-rpm-7.3.0.0-10.aix7.3.ppc.rpm
    Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.6327ed
    + umask 022
    + cd /opt/freeware/src/packages/BUILD
    + RPM_EC=0
    + jobs -p
    + exit 0​

    If I then run dnf info dnf I get the following "invalid magic number".

    # dnf info dnf
    Traceback (most recent call last):
      File "/opt/freeware/bin/dnf", line 58, in <module>
        from dnf.cli import main
      File "/opt/freeware/lib/python3.7/site-packages/dnf/__init__.py", line 30, 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/lib64/python3.7/site-packages/libdnf/__init__.py", line 3, in <module>
        from . import common_types
      File "/opt/freeware/lib64/python3.7/site-packages/libdnf/common_types.py", line 13, in <module>
        from . import _common_types
    ImportError:    0509-022 Cannot load module /opt/freeware/lib64/librepo.a(librepo.so.0).
            0509-150   Dependent module /opt/freeware/lib/libcurl.a(libcurl.so.4) could not be loaded.
            0509-103   The module has an invalid magic number.
            0509-022 Cannot load module /opt/freeware/lib64/python3.7/site-packages/libdnf/_common_types.so.
            0509-150   Dependent module /opt/freeware/lib64/librepo.a(librepo.so.0) could not be loaded.
    #
    ​


    Has anyone come across this and how do I resolve my "invalid magic number" issue?

    For completness here's the output from rpm -qa.

    # rpm -qa | sort
    AIX-rpm-7.3.0.0-13.ppc
    bash-5.1.4-2.ppc
    bash-doc-5.1.4-2.ppc
    bzip2-1.0.8-2.ppc
    ca-certificates-2021.2.52-1.ppc
    check-0.13.0-1.ppc
    curl-7.52.1-1.ppc
    cyrus-sasl-2.1.28-1.ppc
    db-5.3.28-1.ppc
    dbus-1.13.18-1.ppc
    dnf-4.2.17-64_51.ppc
    dnf-automatic-4.2.17-64_51.ppc
    dnf-data-4.2.17-64_51.ppc
    emacs-26.3-1.ppc
    emacs-nox-26.3-1.ppc
    expat-2.4.6-1.ppc
    expect-5.42.1-3.ppc
    gdbm-1.19-1.ppc
    gettext-0.20.2-1.ppc
    glib2-2.56.1-3.ppc
    gmp-6.2.1-1.ppc
    gnupg2-2.2.23-1.ppc
    gnutls-3.7.1-1.ppc
    gpgme-1.13.1-100.ppc
    info-6.7-1.ppc
    json-c-0.15-2.ppc
    libassuan-2.5.3-1.ppc
    libcomps-0.1.11-100.ppc
    libdnf-0.39.1-64_50.ppc
    libffi-3.2.1-3.ppc
    libgcc-8-1.ppc
    libgcc8-8.3.0-6.ppc
    libgcrypt-1.9.4-1.ppc
    libgomp-8-1.ppc
    libgomp8-8.3.0-6.ppc
    libgpg-error-1.42-1.ppc
    libiconv-1.16-1.ppc
    libjpeg-9d-1.ppc
    libksba-1.4.0-1.ppc
    libmodulemd-1.5.2-100.ppc
    librepo-1.11.0-100.ppc
    libsmartcols-2.34-100.ppc
    libsolv-0.7.9-64_50.ppc
    libstdc++-8-1.ppc
    libstdc++8-8.3.0-6.ppc
    libtasn1-4.16.0-1.ppc
    libtextstyle-0.20.2-1.ppc
    libunistring-0.9.10-1.ppc
    libxml2-2.9.11-1.ppc
    libyaml-0.2.2-1.ppc
    libzstd-1.4.4-100.ppc
    ncurses-6.2-3.ppc
    net-snmp-5.8-2.ppc
    net-snmp-utils-5.8-2.ppc
    nettle-3.7.3-1.ppc
    npth-1.5-1.ppc
    openldap-2.4.58-3.ppc
    p11-kit-0.23.22-1.ppc
    p11-kit-tools-0.23.22-1.ppc
    pcre-8.42-1.ppc
    perl-5.30.3-2.ppc
    pysqlite-1.1.7-2.ppc
    python-2.7.10-1.ppc
    python-devel-2.7.10-1.ppc
    python-iniparse-0.4-1.noarch
    python-pycurl-7.19.3-1.ppc
    python-tools-2.7.10-1.ppc
    python-urlgrabber-3.10.1-1.noarch
    python3-3.7.12-1.ppc
    python3-dnf-4.2.17-64_51.ppc
    python3-gpg-1.13.1-100.ppc
    python3-hawkey-0.39.1-64_50.ppc
    python3-libcomps-0.1.11-100.ppc
    python3-libdnf-0.39.1-64_50.ppc
    python3-librepo-1.11.0-100.ppc
    readline-8.1-1.ppc
    rpm-python3-4.15.1-64_2.ppc
    rsync-3.0.6-1.ppc
    sqlite-3.35.5-1.ppc
    tcl-8.4.7-3.ppc
    tk-8.4.7-3.ppc
    unzip-6.0-3.ppc
    wget-1.21.2-1.ppc
    xz-libs-5.2.5-1.ppc
    yum-metadata-parser-1.1.4-2.ppc
    zchunk-libs-1.1.4-101.ppc
    zip-3.0-4.ppc
    zlib-1.2.11-2.ppc
    #

    Many thanks, Steve

    ------------------------------
    Steve Munday
    AIX, IBM i, HMC, PowerVM
    ------------------------------


  • 2.  RE: Ran latest dnf_aixtoolbox.sh - Getting "invalid magic number" for libcurl.a when running "dnf info dnf"

    Posted Fri May 20, 2022 11:09 AM
    Hi Steve,

    We will check the updtvpkg error.

    The invalid magic error is due to the old version of curl which doesn't have required 64-bit shared object in the curl-7.52.1.
    Curl should be updated to latest version with "dnf update" for dnf to run correctly.

    ------------------------------
    SANGAMESH
    ------------------------------