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


#Operatingsystems
#Opensource
#AIX
#AIX Open Source
 View Only
  • 1.  yum not working due to python

    Posted Wed February 07, 2018 05:33 AM

    Originally posted by: SILCAP


    We have installed yum on one server. While installing yum i downgraded python2.7.11 to python2.7.10. yum was installed successfully however it doesnt work.

    Stuck with below error.

    server@root /usr/lib #> yum search
    Could not load program /opt/freeware/bin/python:
            Dependent module libpython2.7.a(libpython2.7.so) could not be loaded.
            The module has an invalid magic number.
    server@root /usr/lib #>

    Below rpms are installed on server

     

    bash-4.4-3.ppc
    db-4.8.24-4.ppc
    gdbm-1.10-1.ppc
    glib2-2.48.1-1.ppc
    info-5.0-2.ppc
    libgcc-6.2.0-1.ppc
    libssh2-1.4.2-1.ppc
    libunistring-0.9.6-2.ppc
    lpar2rrd-agent-4.90-0.ppc
    ncurses-6.0p20160730-1.ppc
    silca_pre_all_mqm-1-1.noarch
    silca_pre_all_tivoli-1-1.noarch
    silca_sys_all_nmon-1-1.noarch
    silca_sys_all_silget-1-2.noarch
    silca_sys_all_tracelog-1-8.noarch
    unzip-5.51-1.ppc
    zip-2.3-3.ppc
    python-2.7.10-1.ppc
    yum-metadata-parser-1.1.4-1.ppc
    pysqlite-1.1.7-1.ppc
    python-pycurl-7.19.3-1.ppc
    yum-3.4.3-3.noarch
    python-tools-2.7.10-1.ppc
    sudo-1.8.15-2.ppc
    AIX-rpm-7.1.4.1-8.ppc
    bzip2-1.0.6-2.ppc
    expat-2.1.1-1.ppc
    gettext-0.19.7-2.ppc
    gmp-6.1.1-1.ppc
    libffi-3.0.13-1.ppc
    libiconv-1.14-22.ppc
    libstdc++-6.2.0-1.ppc
    libxml2-2.9.4-2.ppc
    mod_ssl-2.8.31-1ssl.ppc
    openssl-1.1.0c-2withsslv2.ppc
    readline-6.3-1.ppc
    silca_pre_all_nagios-1-2.noarch
    silca_pre_all_universe-1-1.noarch
    silca_sys_all_rc-1-4.noarch
    silca_sys_all_tem-1-3.noarch
    sqlite-3.7.15.2-3.ppc
    unixODBC-2.3.1-1.ppc
    xz-libs-5.2.2-2.ppc
    zlib-1.2.8-3.ppc
    python-iniparse-0.4-1.noarch
    curl-7.44.0-1.ppc
    python-urlgrabber-3.10.1-1.noarch
    python-devel-2.7.10-1.ppc

     

    can anyone sugget the solution

     

     

     



  • 2.  Re: yum not working due to python

    Posted Fri February 09, 2018 01:30 PM

    Originally posted by: derekb


    I am facing similar issues:

     

    # oslevel -s
    7100-05-01-1731
    root@(/uxperf/uxperf/powervc)$

    root@(/uxperf/uxperf/powervc)$
    # curl --version
    curl 7.56.1 (powerpc-ibm-aix6.1.9.0) libcurl/7.56.1 OpenSSL/1.0.2m zlib/1.2.11
    Release-Date: 2017-10-23
    Protocols: dict file ftp ftps gopher http https imap imaps pop3 pop3s rtsp smb smbs smtp smtps telnet tftp
    Features: AsynchDNS IPv6 Largefile NTLM NTLM_WB SSL libz TLS-SRP UnixSockets HTTPS-proxy

     

    # openssl version
    WARNING: can't open config file: /var/ssl/openssl.cnf
    OpenSSL 1.0.2m  2 Nov 2017

     

    # yum repolist
    Loaded plugins: ps, versionlock
    AIX_Toolbox                                                                                                                           | 2.9 kB  00:00:00
    Traceback (most recent call last):
      File "/usr/bin/yum", line 29, in <module>
        yummain.user_main(sys.argv[1:], exit_code=True)
      File "/opt/freeware/share/yum-cli/yummain.py", line 288, in user_main
        errcode = main(args)
      File "/opt/freeware/share/yum-cli/yummain.py", line 140, in main
        result, resultmsgs = base.doCommands()
      File "/opt/freeware/share/yum-cli/cli.py", line 440, in doCommands
        return self.yum_cli_commands[self.basecmd].doCommand(self, self.basecmd, self.extcmds)
      File "/opt/freeware/share/yum-cli/yumcommands.py", line 864, in doCommand
        base.repos.populateSack()
      File "/opt/freeware/lib/python2.7/site-packages/yum/repos.py", line 294, in populateSack

     

    # python
    Python 2.7.5 (default, Aug  2 2013, 23:28:11) [C] on aix6
    Type "help", "copyright", "credits" or "license" for more information.
    >>>

     

    # yum search
    Loaded plugins: ps, versionlock
    Error: Need an item to match
     Mini usage:

    search SOME_STRING

    Search package details for the given string

     



  • 3.  Re: yum not working due to python

    Posted Tue February 13, 2018 01:54 AM

    Originally posted by: sanket


    What is the method you used to install YUM ?

    Looks like you have older version of python in your system. 

     



  • 4.  Re: yum not working due to python

    Posted Tue February 13, 2018 01:49 AM

    Originally posted by: sanket


    What is the method you used to install YUM ?

    How did you downgrad python to 2.7.10 ? 



  • 5.  Re: yum not working due to python

    Posted Tue February 13, 2018 01:55 AM

    Originally posted by: SILCAP


    I used yum tar from the IBM site and installed with standard yum script ..yum.sh. I downgraded python using below command.

    #rpm -Uvh python-2.7.10-1.aix6.1.ppc.rpm --replacefiles



  • 6.  Re: yum not working due to python

    Posted Tue February 13, 2018 02:10 AM

    Originally posted by: sanket


    There is no 2.7.11 python on AIX toolbox. So probably it was from some other source and overwriting that would have caused some conflict.

    Some of the packages from different sources on AIX does not work on AIX because they are built with different decencies.

    Is it possible for you to try on a machine that does not have any open source packages from any other repository and only from AIX toolbox.

    Also one thing you can try updating to latest python from AIX toolbox and install required dependencies.

     



  • 7.  Re: yum not working due to python

    Posted Tue February 13, 2018 02:29 AM

    Originally posted by: SILCAP


    I have already done yum installation on many servers but iam stuck with this one. I tried removing all python filesets yum and reinstalled but it seems other packages which are already installed are on higher version than the yum tarball. I have below error now after reinstallation.

     

    Skipping db-4.8.24-3 as higher version is installed already.
    Please make sure these packages are from toolbox as there is no gurantee that
    third party packages may be compatible with toolbox packages.

    Skipping gdbm-1.8.3-5 as higher version is installed already.
    Please make sure these packages are from toolbox as there is no gurantee that
    third party packages may be compatible with toolbox packages.

    Skipping gettext-0.10.40-8 as higher version is installed already.
    Please make sure these packages are from toolbox as there is no gurantee that
    third party packages may be compatible with toolbox packages.

    Skipping glib2-2.14.6-2 as higher version is installed already.
    Please make sure these packages are from toolbox as there is no gurantee that
    third party packages may be compatible with toolbox packages.

     

     

    server@root /root #> yum
    There was a problem importing one of the Python modules
    required to run yum. The error leading to this problem was:

       Could not load module /usr/lib/libglib-2.0.a(libglib-2.0.so.0).
            Dependent module /usr/lib/libiconv.a(libiconv.so.2) could not be loaded.
            Member libiconv.so.2 is not found in archive
    Could not load module /opt/freeware/lib/python2.7/site-packages/_sqlitecache.so.
            Dependent module /usr/lib/libglib-2.0.a(libglib-2.0.so.0) could not be loaded.

    Please install a package which provides this module, or
    verify that the module is installed correctly.

    It's possible that the above module doesn't match the
    current version of Python, which is:
    2.7.10 (default, Jun 22 2016, 05:57:59) [C]

    If you cannot solve this problem yourself, please go to
    the yum faq at:
      http://yum.baseurl.org/wiki/Faq

     



  • 8.  Re: yum not working due to python

    Posted Fri February 23, 2018 05:25 AM

    Originally posted by: sanket


     

    This is the problem because of packages from other source.

    Right now to me it looks like you have glib2 packages from some other repository and that is dependent on libiconv provided by same repository.

    AIX toolbox provided glib2 is dependencies on libiconv provided by AIX. 

    In this particular case when glib2 is getting loaded it is trying to find that libiconv and looks like it is not finding it.

    The best solution is to remove all the rpms and start fresh.

     

    One thing you can try otherwise to see if libiconv is installed as rpm or not ?

    If not then please install it from the same repository from where you have installed glib2 and see if things works after that.

     

    Thanks

    Sanket

     

     



  • 9.  Re: yum not working due to python

    Posted Fri June 08, 2018 11:31 AM

    Originally posted by: sandeep r d


    I had the same issue

    root@server:/root> yum
    ERROR:root:code for hash md5 was not found.
    Traceback (most recent call last):
      File "/opt/freeware/lib/python2.7/hashlib.py", line 147, in <module>
        globals()[__func_name] = __get_hash(__func_name)
      File "/opt/freeware/lib/python2.7/hashlib.py", line 97, in __get_builtin_constructor
        raise ValueError('unsupported hash type ' + name)
    ValueError: unsupported hash type md5
    ERROR:root:code for hash sha1 was not found.
    Traceback (most recent call last):

     

    I update SSL to openssl.base - 1.0.2.1500  and exported "LD_LIBRARY_PATH" , it worked.

     

    root@server:/root> export LD_LIBRARY_PATH=/usr/lib:/opt/freeware/lib/

     

    root@serevr:/root> yum
    You need to give some command
    Usage: yum [options] COMMAND

    List of Commands:

    check          Check for problems in the rpmdb
    check-update   Check for available package updates
    clean          Remove cached data
    deplist        List a package's dependencies
    distribution-synchronization Synchronize installed packages to the latest available versions
    downgrade      downgrade a package
    erase          Remove a package or packages from your system