AIX Open Source

AIX Open Source

Share your experiences and connect with fellow developers to discover how to build and manage open source software for the AIX operating system

 View Only
Expand all | Collapse all

Need Assistance installing GIT on AIX 7.2

  • 1.  Need Assistance installing GIT on AIX 7.2

    Posted Mon October 10, 2022 12:03 PM
    I'm attempting to install the GIT tuility using DNF on AIX 7.2 TL05/SP3. I was able to update OpenSSL and OpenSSH to the latest version, run updtvpkg, and install dnf using the IBM provided script, dnf_aixtoolbox.sh. However, I now receive the following when attempting to run dnf install or dnf update:

    You have enabled checking of packages via GPG keys. This is a good thing.
    However, you do not have any GPG public keys installed. You need to download
    the keys for packages you wish to install and install them.
    You can do that by running the command:
    rpm --import public.gpg.key
    Alternatively you can specify the url to the key you would like to use
    for a repository in the 'gpgkey' option in a repository section and DNF
    will install it for you.
    For more information contact your distribution or package provider.

    When I run rpm --import public.gpg.key, I receive the following output:

    error: public.gpg.key: import read failed(2).

    Please advise. Thanks!

    -Rich Scott

    ------------------------------
    Richard K. Scott
    ------------------------------


  • 2.  RE: Need Assistance installing GIT on AIX 7.2
    Best Answer

    Posted Tue October 11, 2022 11:47 AM
    Hi Rich,

    IBM RPM packages are not signed (btw why? @SANKET RATHI). You must switch off GPG checking in your repo files. Find the file /opt/freeware/etc/dnf/dnf.conf and change gpgcheck to 0 everywhere where you can find it:

    gpgcheck=0

    Then try installing git again.
    ​​

    ------------------------------
    Andrey Klyachkin

    https://www.power-devops.com
    ------------------------------



  • 3.  RE: Need Assistance installing GIT on AIX 7.2

    Posted Tue October 11, 2022 01:36 PM
    Hi Andrey,

    Thanks for your guidance!  That worked perfectly!

    -Rich

    ------------------------------
    Richard K. Scott
    ------------------------------



  • 4.  RE: Need Assistance installing GIT on AIX 7.2

    Posted Thu October 13, 2022 04:17 AM
    Edited by SANKET RATHI Fri October 14, 2022 01:08 AM
    Historically it was not signed and people are using that way. 
    We discussed sometime to start signing but then there will be some user impact on repo usage, mixture of signed/non signed packages etc
    We are busy with other things and need to plan this correctly, will look at this in future.

    ------------------------------
    SANKET RATHI
    ------------------------------



  • 5.  RE: Need Assistance installing GIT on AIX 7.2

    Posted Thu October 13, 2022 10:27 AM
    Thanks, Sanket.  Interestingly, after installing the git utility and pre-requites, I'm now seeing the following behaviors:

    =) pip list
    DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality.
    Package Version
    ------------------- -------
    iniparse 0.4
    pip 20.3.4
    pycurl 7.19.3
    pysqlite 1.1.7
    setuptools 0.9.8
    urlgrabber 3.10.1
    yum-metadata-parser 1.1.4

    =) python -m pip install requests
    Traceback (most recent call last):
    File "/opt/freeware/lib64/python3.7/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
    File "/opt/freeware/lib64/python3.7/runpy.py", line 85, in _run_code
    exec(code, run_globals)
    File "/opt/freeware/lib/python3.7/site-packages/pip/__main__.py", line 23, in <module>
    from pip._internal.cli.main import main as _main # isort:skip # noqa
    File "/opt/freeware/lib/python3.7/site-packages/pip/_internal/cli/main.py", line 10, in <module>
    from pip._internal.cli.autocompletion import autocomplete
    File "/opt/freeware/lib/python3.7/site-packages/pip/_internal/cli/autocompletion.py", line 9, in <module>
    from pip._internal.cli.main_parser import create_main_parser
    File "/opt/freeware/lib/python3.7/site-packages/pip/_internal/cli/main_parser.py", line 7, in <module>
    from pip._internal.cli import cmdoptions
    File "/opt/freeware/lib/python3.7/site-packages/pip/_internal/cli/cmdoptions.py", line 24, in <module>
    from pip._internal.cli.progress_bars import BAR_TYPES
    File "/opt/freeware/lib/python3.7/site-packages/pip/_internal/cli/progress_bars.py", line 12, in <module>
    from pip._internal.utils.logging import get_indentation
    File "/opt/freeware/lib/python3.7/site-packages/pip/_internal/utils/logging.py", line 18, in <module>
    from pip._internal.utils.misc import ensure_dir
    File "/opt/freeware/lib/python3.7/site-packages/pip/_internal/utils/misc.py", line 31, in <module>
    from pip._internal.locations import (
    File "/opt/freeware/lib/python3.7/site-packages/pip/_internal/locations/__init__.py", line 9, in <module>
    from pip._internal.models.scheme import SCHEME_KEYS, Scheme
    ImportError: cannot import name 'SCHEME_KEYS' from 'pip._internal.models.scheme' (/opt/freeware/lib/python3.7/site-packages/pip/_internal/models/scheme.py)

    Some information on the Python installation:

    =) python -V
    Python 3.7.12

    =) ls -la /usr/bin | grep -i pyth
    lrwxrwxrwx 1 root system 35 Oct 12 13:39 python -> ../../opt/freeware/bin/python3.7_64

    =) rpm -qa | grep -i python
    python-iniparse-0.4-1.noarch
    python-urlgrabber-3.10.1-1.noarch
    python-pip-10.0.1-1.noarch
    rpm-python3-4.15.1-32_1.ppc
    python3-libdnf-0.39.1-32_2.ppc
    python3-dateutil-2.8.0-1.noarch
    python3-dnf-4.2.17-32_2.noarch
    python3-dnf-plugins-core-4.0.16-32_1.noarch
    python3-3.7.12-1.ppc
    python-tools-2.7.18-3.ppc
    python-pycurl-7.19.3-1.ppc
    python-setuptools-0.9.8-2.noarch
    python3-hawkey-0.39.1-32_2.ppc
    python3-six-1.13.0-1.noarch
    python3-gpgme-1.13.1-32_1.ppc
    python3-libcomps-0.1.11-32_1.ppc
    python3-dnf-plugin-migrate-4.0.16-32_1.noarch
    python3-librepo-1.11.0-32_1.ppc
    python-devel-2.7.18-3.ppc
    python-2.7.18-3.ppc

    =) lslpp -l | grep -i python
    aixtools.python.py39.adt 3.9.1.0 COMMITTED python py39 ADT files
    aixtools.python.py39.man.en_US
    3.9.1.0 COMMITTED python py39 man pages
    aixtools.python.py39.rte 3.9.1.0 COMMITTED python py39 04-Jan-2021

    Not sure how to fix this. . . 

    -Rich


    ------------------------------
    Richard K. Scott
    ------------------------------



  • 6.  RE: Need Assistance installing GIT on AIX 7.2

    Posted Thu October 13, 2022 11:40 AM
    Hi Richard,

    you have three different python installations. Do you need all of them?

    If you just want to have requests module for python3, try

    yum install python3-requests

    Best regards
    Andrey

    ------------------------------
    Andrey Klyachkin

    https://www.power-devops.com
    ------------------------------



  • 7.  RE: Need Assistance installing GIT on AIX 7.2

    Posted Thu October 13, 2022 03:37 PM
    Thanks again, Andrey.  I was able to successfully install python3-requests.  However, now whenever I run either yum or dnf commands, this happens:

    dnf clean all
    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: 0509-022 Cannot load module /opt/freeware/lib/python3.7/site-packages/libdnf/_common_types.so.
    0509-150 Dependent module 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.7/site-packages/libdnf/_common_types.so.
    0509-150 Dependent module /opt/freeware/lib/python3.7/site-packages/libdnf/_common_types.so could not be loaded.

    -Rich

    ------------------------------
    Richard K. Scott
    ------------------------------



  • 8.  RE: Need Assistance installing GIT on AIX 7.2

    Posted Fri October 14, 2022 02:05 AM
    Hi Rich,

    You have LIBPATH set to /usr/lib first ?
    Please try dnf without any LIBPATH.

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



  • 9.  RE: Need Assistance installing GIT on AIX 7.2

    Posted Fri October 14, 2022 10:05 AM
    Hi Sangamesh,

    I've clear the LIBPATH environment variable.  Now this happens:

    =) unset LIBPATH

    =) echo $LIBPATH


    =) dnf clean all
    IOT/Abort trap(coredump)

    -Rich

    ------------------------------
    Richard K. Scott
    ------------------------------



  • 10.  RE: Need Assistance installing GIT on AIX 7.2

    Posted Mon October 17, 2022 10:13 AM
    This is strange. This should not happen and never happened before.
    We would like more information. 
    1. Output of "rpm -qa"
    2. core file
    3. AIX level

    ------------------------------
    SANKET RATHI
    ------------------------------



  • 11.  RE: Need Assistance installing GIT on AIX 7.2

    Posted Mon October 17, 2022 10:57 AM
    Hello Sanket,

    I've attached the output for rpm -qa as well as a tarball containing the core file that dnf throws.  The server in question is running AIX 7200-05-03-2148.  Thanks!

    -Rich

    ------------------------------
    Richard K. Scott
    ------------------------------

    Attachment(s)



  • 12.  RE: Need Assistance installing GIT on AIX 7.2

    Posted Fri October 21, 2022 01:34 PM
    Hi Rich,

    Please update python3-3.7.9-0 to latest one python3-3.7.12.
    Not sure why you have installed the one from dnf bundle after all the packages are update to latest version.

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