Open Source Development

Power Open Source Development

Explore the open source tools and capabilities for building and deploying modern applications on IBM Power platforms including AIX, IBM i, and Linux.


#Power


#Power

 View Only
Expand all | Collapse all

dnf installation

  • 1.  dnf installation

    Posted Mon January 10, 2022 09:34 PM

    Hi

    I was able to install dnf successfully  on 7100-04-03-1642.
    Installing the packages...

    Verifying... ################################# [100%]
    Preparing... ################################# [100%]
    Updating / installing...
    1:python3-3.7.9-0 ################################# [ 5%]
    2:libzstd-1.4.4-32_1 ################################# [ 9%]
    3:libmodulemd-1.5.2-32_1 ################################# [ 14%]
    4:libsolv-0.7.9-32_1 ################################# [ 18%]
    5:libsmartcols-2.34-32_1 ################################# [ 23%]
    6:zchunk-libs-1.1.4-32_1 ################################# [ 27%]
    7:librepo-1.11.0-32_1 ################################# [ 32%]
    8:rpm-python3-4.15.1-32_1 ################################# [ 36%]
    9:libdnf-0.39.1-32_1 ################################# [ 41%]
    10:python3-libdnf-0.39.1-32_1 ################################# [ 45%]
    11:python3-hawkey-0.39.1-32_1 ################################# [ 50%]
    12:libcomps-0.1.11-32_1 ################################# [ 55%]
    13:python3-libcomps-0.1.11-32_1 ################################# [ 59%]
    14:python3-gpgme-1.13.1-32_1 ################################# [ 64%]
    15:p11-kit-0.23.16-0 ################################# [ 68%]
    16:p11-kit-tools-0.23.16-0 ################################# [ 73%]
    17:dnf-data-4.2.17-32_1 ################################# [ 77%]
    18:python3-dnf-4.2.17-32_1 ################################# [ 82%]
    19:dnf-4.2.17-32_1 ################################# [ 86%]
    20:dnf-automatic-4.2.17-32_1 ################################# [ 91%]
    21:ca-certificates-2020.06.01-0 ################################# [ 95%]
    22:python3-librepo-1.11.0-32_1 ################################# [100%]

    dnf installed successfully.
    Please run 'dnf update' to update packages to the latest level.


    I am getting below error while running dnf commands.

    ERROR
    root@aixlab:/tmp/rsyslog/test# /opt/freeware/bin/dnf update
    Fatal Python error: _Py_HashRandomization_Init: failed to get random numbers to initialize Python

    Please suggest how to resolve the issue?

    Thanks
    Rizwan




    ------------------------------
    Rizwan Khaliq
    ------------------------------

    #AIXOpenSource


  • 2.  RE: dnf installation

    Posted Tue January 11, 2022 05:25 AM
    Hi Rizwan,

    Are you able to run 32-bit python3 fine (/opt/freeware/bin/python3_32) ?

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



  • 3.  RE: dnf installation

    Posted Tue January 11, 2022 08:30 AM
    Hi Sangamesh
    No, I can't run /opt/freeware/bin/python3_32, I encounter same issue.

    /home/root# /opt/freeware/bin/python3_32
    Fatal Python error: _Py_HashRandomization_Init: failed to get random numbers to initialize Python

    Thanks
    Rizwan

    ------------------------------
    Rizwan Khaliq
    ------------------------------



  • 4.  RE: dnf installation

    Posted Tue January 11, 2022 10:24 AM
    Edited by SANGAMESH MALLAYYA Tue January 11, 2022 10:24 AM
    Your machine would be missing /dev/urandom device.

    # mv /dev/urandom /dev/urandom_bak

    # /opt/freeware/bin/python3_32
    Fatal Python error: _Py_HashRandomization_Init: failed to get random numbers to initialize Python

    # mv /dev/urandom_bak /dev/urandom

    # /opt/freeware/bin/python3_32
    Python 3.7.12 (default, Dec 15 2021, 03:42:46)
    [GCC 8.3.0] on aix6
    Type "help", "copyright", "credits" or "license" for more information.
    >>>



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



  • 5.  RE: dnf installation

    Posted Tue January 11, 2022 11:22 AM
    Hi SANGAMESH

    I have these devices already.
    :/home/root# ls -l /dev/*random
    crw-r--r-- 1 root system 35, 0 Jan 06 17:49 /dev/random
    crw-r--r-- 1 root system 35, 1 Jan 06 17:49 /dev/urandom

    Thanks
    Rizwan



    ------------------------------
    Rizwan Khaliq
    ------------------------------



  • 6.  RE: dnf installation

    Posted Tue January 11, 2022 11:40 AM
    Hi Sangamesh
    I even tried removing and recreating /dev/random and /dev/urandom deivices but no luck.

    Thanks
    Rizwan

    ------------------------------
    Rizwan Khaliq
    ------------------------------



  • 7.  RE: dnf installation

    Posted Tue January 11, 2022 01:04 PM
    Try running /opt/freeware/bin/python3_32 with truss and verify if it still fails due to /dev/urandom.

    truss /opt/freeware/bin/python3_32

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



  • 8.  RE: dnf installation

    Posted Tue January 11, 2022 01:47 PM
    Hi Sangamesh
    :/home/myroot# truss /opt/freeware/bin/python3_32
    execve("/opt/freeware/bin/python3_32", 0x2FF22C58, 0x20013AC8) argc: 1
    read_sysconfig(0xF084ECD8, 0x00000010, 0xFFFFFFF9, 0x10000000, 0x30000EDF, 0x00000088, 0x06010000, 0xF08C0EF0) = 0x00000000
    __loadx(0x03480000, 0x2FF22A30, 0x00000160, 0x0000D032, 0x00003B90) = 0x00000000
    sbrk(0x00000000) = 0x30009774
    vmgetinfo(0x2FF223E0, 7, 16) = 0
    sbrk(0x00000000) = 0x30009774
    sbrk(0x0000000C) = 0x30009774
    __libc_sbrk(0x00000000) = 0x30009780
    __loadx(0x0C000000, 0xF030AC98, 0x00000000, 0x00000000, 0x30009790) = 0x00000000
    thread_init(0x0000000000000000, 0x00000000D0535660) =
    sbrk(0x00000000) = 0x30019790
    vmgetinfo(0x2FF22930, 7, 16) = 0
    smcr_procattr(0, 1, 0x2FF22928) Err#109 ENOSYS
    getrpid(-1, -1, -1) = 8782008
    _getpid() = 8782008
    getprocs(0x3000A248, 936, 0x00000000, 0, 0xF02C407C, 1) = 1
    appulimit(1005, 0) = 0x2DF23000
    _thread_self() = 21954631
    thread_setmystate(0x00000000, 0x2FF22560) = 0
    thread_setmystate(0x2FF22248, 0x2FF22550) = 0
    _sigaction(3, 0x2FF228A8, 0x2FF228B8) = 0
    _sigaction(4, 0x2FF228A8, 0x2FF228B8) = 0
    _sigaction(5, 0x2FF228A8, 0x2FF228B8) = 0
    _sigaction(6, 0x2FF228A8, 0x2FF228B8) = 0
    _sigaction(7, 0x2FF228A8, 0x2FF228B8) = 0
    _sigaction(8, 0x2FF228A8, 0x2FF228B8) = 0
    _sigaction(10, 0x2FF228A8, 0x2FF228B8) = 0
    _sigaction(11, 0x2FF228A8, 0x2FF228B8) = 0
    _sigaction(12, 0x2FF228A8, 0x2FF228B8) = 0
    _sigaction(36, 0x2FF228A8, 0x2FF228B8) = 0
    _sigaction(39, 0x2FF228A8, 0x2FF228B8) = 0
    __loadx(0x0E000000, 0x2FF22890, 0x00000018, 0xF030A0B0, 0x00000000) = 0x00000000
    getuidx(4) = 2020
    getuidx(2) = 2020
    getuidx(1) = 2020
    getgidx(4) = 1000
    getgidx(2) = 1000
    getgidx(1) = 1000
    __loadx(0x01480080, 0x2FF213F0, 0x00000A50, 0x2FF21F50, 0x00000000) = 0xD0572128
    __loadx(0x01480180, 0x2FF213F0, 0x00000A50, 0xF0844760, 0xF0844690) = 0xF0933400
    __loadx(0x07080000, 0xF0844730, 0xFFFFFFFF, 0xF0933400, 0x00003B90) = 0xF09343AC
    __loadx(0x07080000, 0xF0844670, 0xFFFFFFFF, 0xF0933400, 0x00003B90) = 0xF09343B8
    __loadx(0x07080000, 0xF0844740, 0xFFFFFFFF, 0xF0933400, 0x00003B90) = 0xF09343E8
    __loadx(0x07080000, 0xF0844680, 0xFFFFFFFF, 0xF0933400, 0x00003B90) = 0xF09343F4
    __loadx(0x07080000, 0xF0844700, 0xFFFFFFFF, 0xF0933400, 0x00003B90) = 0xF09343C4
    __loadx(0x07080000, 0xF08446A0, 0xFFFFFFFF, 0xF0933400, 0x00003B90) = 0xF09343DC
    __loadx(0x07080000, 0xF0844710, 0xFFFFFFFF, 0xF0933400, 0x00003B90) = 0xF0934400
    __loadx(0x07080000, 0xF0844720, 0xFFFFFFFF, 0xF0933400, 0x00003B90) = 0xF0934430
    __loadx(0x07080000, 0xF08446B0, 0xFFFFFFFF, 0xF0933400, 0x00003B90) = 0xF0934418
    __loadx(0x07080000, 0xF08446C0, 0xFFFFFFFF, 0xF0933400, 0x00003B90) = 0xF0934490
    getuidx(4) = 2020
    getuidx(2) = 2020
    getuidx(1) = 2020
    getgidx(4) = 1000
    getgidx(2) = 1000
    getgidx(1) = 1000
    __loadx(0x01480080, 0x2FF213F0, 0x00000A50, 0x2FF21F50, 0x00000000) = 0xD0572128
    getuidx(4) = 2020
    getuidx(2) = 2020
    getuidx(1) = 2020
    getgidx(4) = 1000
    getgidx(2) = 1000
    getgidx(1) = 1000
    __loadx(0x01480080, 0x2FF213F0, 0x00000A50, 0x2FF21F50, 0x00000000) = 0xD0572128
    getuidx(4) = 2020
    getuidx(2) = 2020
    getuidx(1) = 2020
    getgidx(4) = 1000
    getgidx(2) = 1000
    getgidx(1) = 1000
    __loadx(0x01480080, 0x2FF213F0, 0x00000A50, 0x2FF21F50, 0x00000000) = 0xD0572128
    getuidx(4) = 2020
    getuidx(2) = 2020
    getuidx(1) = 2020
    getgidx(4) = 1000
    getgidx(2) = 1000
    getgidx(1) = 1000
    __loadx(0x01480080, 0x2FF213F0, 0x00000A50, 0x2FF21F50, 0x00000000) = 0xD0572128
    getuidx(4) = 2020
    getuidx(2) = 2020
    getuidx(1) = 2020
    getgidx(4) = 1000
    getgidx(2) = 1000
    getgidx(1) = 1000
    __loadx(0x01480080, 0x2FF213F0, 0x00000A50, 0x2FF21F50, 0x00000000) = 0xD0572128
    readlink("/opt/freeware/bin/python3_32", "", 1024) = 12
    readlink("/opt/freeware/bin/python3.7_32", "python3.7_32", 1024) = 13
    readlink("/opt/freeware/bin/python3.7m_32", "python3.7m_32", 1024) Err#22 EINVAL
    kopen("/opt/freeware/bin/pyvenv.cfg", O_RDONLY|O_LARGEFILE) Err#2 ENOENT
    kopen("/opt/freeware/pyvenv.cfg", O_RDONLY|O_LARGEFILE) Err#2 ENOENT
    statx("/opt/freeware/bin/Modules/Setup", 0x2FF211F8, 128, 010) Err#2 ENOENT
    statx("/opt/freeware/bin/lib/python3.7/os.py", 0x2FF20108, 128, 010) Err#2 ENOENT
    statx("/opt/freeware/bin/lib/python3.7/os.pyc", 0x2FF20108, 128, 010) Err#2 ENOENT
    statx("/opt/freeware/lib/python3.7/os.py", 0x2FF20108, 128, 010) = 0
    statx("/opt/freeware/bin/pybuilddir.txt", 0x2FF22200, 128, 010) Err#2 ENOENT
    statx("/opt/freeware/bin/lib/python3.7/lib-dynload", 0x2FF22200, 128, 010) Err#2 ENOENT
    statx("/opt/freeware/lib/python3.7/lib-dynload", 0x2FF22200, 128, 010) = 0
    getuidx(4) = 2020
    getuidx(2) = 2020
    getuidx(1) = 2020
    getgidx(4) = 1000
    getgidx(2) = 1000
    getgidx(1) = 1000
    getuidx(4) = 2020
    getuidx(2) = 2020
    getuidx(1) = 2020
    getgidx(4) = 1000
    getgidx(2) = 1000
    getgidx(1) = 1000
    getuidx(4) = 2020
    getuidx(2) = 2020
    getuidx(1) = 2020
    getgidx(4) = 1000
    getgidx(2) = 1000
    getgidx(1) = 1000
    getuidx(4) = 2020
    getuidx(2) = 2020
    getuidx(1) = 2020
    getgidx(4) = 1000
    getgidx(2) = 1000
    getgidx(1) = 1000
    getuidx(4) = 2020
    getuidx(2) = 2020
    getuidx(1) = 2020
    getgidx(4) = 1000
    getgidx(2) = 1000
    getgidx(1) = 1000
    getuidx(4) = 2020
    getuidx(2) = 2020
    getuidx(1) = 2020
    getgidx(4) = 1000
    getgidx(2) = 1000
    getgidx(1) = 1000
    kioctl(0, 22528, 0x00000000, 0x00000000) = 0
    getuidx(4) = 2020
    getuidx(2) = 2020
    getuidx(1) = 2020
    getgidx(4) = 1000
    getgidx(2) = 1000
    getgidx(1) = 1000
    __loadx(0x01480080, 0x2FF212F0, 0x00000A50, 0x2FF21E50, 0x00000000) = 0xD0572128
    kopen("/dev/urandom", 0440000000) Err#22 EINVAL
    Fatal Python error: kwrite(2, " F a t a l P y t h o n".., 20) = 20
    _Py_Hashkwrite(2, " _ P y _ H a s h", 8) = 8
    Randomizkwrite(2, " R a n d o m i z", 8) = 8
    ation_Inkwrite(2, " a t i o n _ I n", 8) = 8
    itkwrite(2, " i t", 2) = 2
    : kwrite(2, " : ", 2) = 2
    failed tkwrite(2, " f a i l e d t", 8) = 8
    o get rakwrite(2, " o g e t r a", 8) = 8
    ndom numkwrite(2, " n d o m n u m", 8) = 8
    bers to kwrite(2, " b e r s t o ", 8) = 8
    initialikwrite(2, " i n i t i a l i", 8) = 8
    ze Pythokwrite(2, " z e P y t h o", 8) = 8
    nkwrite(2, " n", 1) = 1

    kwrite(2, "\n", 1) = 1
    kfcntl(2, F_GETFL, 0x00000008) = 67110914

    kwrite(2, "\n", 1) = 1
    kfcntl(2, F_GETFL, 0x00000008) = 67110914
    __loadx(0x04400000, 0x2FF21DF0, 0x00000800, 0xFFFF8006, 0x00000000) = 0x00000000
    kfcntl(1, F_GETFL, 0x114F0047) = 67110914
    kfcntl(2, F_GETFL, 0x114F0047) = 67110914
    _exit(1)

    Thanks
    Rizwan

    ------------------------------
    Rizwan Khaliq
    ------------------------------



  • 9.  RE: dnf installation

    Posted Thu January 13, 2022 10:34 AM
    Hi Rizwan,

    As we can see there is some issue with opening the /dev/urandom device still.

    kopen("/dev/urandom", 0440000000) Err#22 EINVAL

    Are you able to run rpm command without any issues ?
    For example "rpm -qa"

    Also, may be you can try sample program to see if you get the same error.

    #include <fcntl.h>
    #include <stdio.h>
    #include <errno.h>
    int main()
    {
    if (open("/dev/urandom", O_RDONLY) == -1)
    printf("%s\n", strerror(errno));
    }

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



  • 10.  RE: dnf installation

    Posted Thu January 13, 2022 11:29 AM
    Hi Sangamesh

    I am not sure how you want me to execute the sample program you provided. Can you let me know? Otherwise  /dev/urandom seems to be working.

    root@:/opt/IBM# od -vAn -N2 -tu2 < /dev/urandom
    14516

    root@:/opt/IBM# rpm -qa
    unzip-5.51-1.ppc
    tar-1.14-2.ppc
    wget-1.9.1-2ssl.ppc
    libzstd-1.4.4-32_1.ppc
    libsolv-0.7.9-32_1.ppc
    zchunk-libs-1.1.4-32_1.ppc
    rpm-python3-4.15.1-32_1.ppc
    python3-libdnf-0.39.1-32_1.ppc
    libcomps-0.1.11-32_1.ppc
    python3-gpgme-1.13.1-32_1.ppc
    p11-kit-tools-0.23.16-0.ppc
    python3-dnf-4.2.17-32_1.noarch
    dnf-automatic-4.2.17-32_1.noarch
    python3-librepo-1.11.0-32_1.ppc
    AIX-rpm-7.1.4.30-11.ppc
    lsof-4.88-1.ppc
    bash_64-4.3-15.ppc
    zlib-1.2.11-2.ppc
    python3-3.7.9-0.ppc
    libmodulemd-1.5.2-32_1.ppc
    libsmartcols-2.34-32_1.ppc
    librepo-1.11.0-32_1.ppc
    libdnf-0.39.1-32_1.ppc
    python3-hawkey-0.39.1-32_1.ppc
    python3-libcomps-0.1.11-32_1.ppc
    p11-kit-0.23.16-0.ppc
    dnf-data-4.2.17-32_1.noarch
    dnf-4.2.17-32_1.noarch
    ca-certificates-2020.06.01-0.ppc
    popt-1.7-2.ppc
    root@:/opt/IBM#

    Thanks

    ------------------------------
    Rizwan Khaliq
    ------------------------------



  • 11.  RE: dnf installation

    Posted Mon January 17, 2022 06:16 AM
    Hi Rizwan,

    Not sure if it's specific to AIX version.
    But second argument to kopen seems to something wrong in this case.
    kopen("/dev/urandom", 0440000000) Err#22 EINVAL

    I will check this and let you know.

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



  • 12.  RE: dnf installation

    Posted Fri January 21, 2022 03:25 AM
    This issue seems to be specific to AIX 7.1 TL04 and SPs.
    I didn't see this issue in TL3 & TL5.
    Please also have look at this bug https://bugs.python.org/issue36843

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



  • 13.  RE: dnf installation

    Posted Tue July 05, 2022 08:05 PM
    FYI

    I suspect this is the resolving APAR for the urandom errors for Python

    https://www.ibm.com/support/pages/apar/IV90804

    IV90804: OPENING A FILE IN AFS WITH O_CLOEXEC FAILS WITH AN EINVAL ERROR APPLIES TO AIX 7100-04 17/04/14 PTF PECHANGE

    A file open with O_CLOEXEC flag in file systems not
    supporting 64-bit open flag fails with an EINVAL error.
    
    AFS and JFS, to name a few, are apparently affected with
    IV69062/IV73732 64-BIT SUPPORT FOR OPEN FLAGS.
    Problem summary
    ****************************************************************
    * USERS AFFECTED:
    * Systems running the 7100-04 Technology Level with
    * any of the following filesets at or between the given levels:
    * MIN          MAX          FILESET
    * 7.1.4.0      7.1.4.31     bos.mp64
    ****************************************************************
    * PROBLEM DESCRIPTION:
    * A file open with O_CLOEXEC flag in file systems not
    * supporting 64-bit open flag fails with an EINVAL error.
    * AFS and JFS, to name a few, are apparently affected with
    * IV69062/IV73732 64-BIT SUPPORT FOR OPEN FLAGS.
    ****************************************************************
    * RECOMMENDATION:
    * Install APAR IV90804.
    ****************************************************************
    



    ------------------------------
    Jan Harris
    AIX Development Support (Liaison to the AIX Toolbox for Open Source)
    IBM (Contract)
    Austin TX
    ------------------------------



  • 14.  RE: dnf installation

    Posted Wed July 06, 2022 01:33 PM
    I can confirm, the  7100-04-04-1717 SP Update, which includes the following 
    IV90804: OPENING A FILE IN AFS WITH O_CLOEXEC FAILS WITH AN EINVAL ERROR APPLIES TO AIX 7100-04 17/04/14 

    Resolved the following error for my customer:


    ERROR
    # /opt/freeware/bin/dnf update
    Fatal Python error: _Py_HashRandomization_Init: failed to get random numbers to initialize Python




    ------------------------------
    Jan Harris
    AIX Development Support (Liaison to the AIX Toolbox for Open Source)
    IBM (Contract)
    Austin TX
    ------------------------------



  • 15.  RE: dnf installation

    Posted Thu December 22, 2022 03:05 AM
    Thank you!!!! Thank you!!!! Thank you a million times over. The author should update his webpage to say install the 7.1.4.5-XXX updates before running ./dnf update.

    ------------------------------
    Matthew Murdock
    ------------------------------