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

AIX 7.1 TL5 perl -e 'use XML::Parser' error Can't load '.../Expat.so'

  • 1.  AIX 7.1 TL5 perl -e 'use XML::Parser' error Can't load '.../Expat.so'

    Posted Fri March 18, 2022 07:08 AM
    Environment:  AIX7100-05-05-1939
    Problem:
    The command "perl -e 'use XML::Parser'" can run on one server "up2crmsua1" but fails to run on another server "up2f2clua1". I found that the working server has installed the expat RPM packages. So I tried to install both expat RPM packages below on the problem server but it does not help.

      expat-2.4.4-1.ppc
      expat-devel-2.4.4-1.ppc

    up2f2clua1:root:/tmp>lslpp -L |grep -i perl
      perl.libext 2.3.5.31 C F Perl Library Extensions
      perl.rte 5.28.1.0 C F Perl Version 5 Runtime

    -------------------------------------------------------
    up2f2clua1:root:/tmp>perl -e 'use XML::Parser'
    Can't load '/usr/opt/perl5/lib/site_perl/5.28.1/aix-thread-multi/auto/XML/Parser/Expat/Expat.so' for module XML::Parser::Expat: Could not load module /usr/opt/perl5/lib/site_perl/5.28.1/aix-thread-multi/auto/XML/Parser/Expat/Expat.so.
    Dependent module libexpat.a(libexpat.so.1) could not be loaded.
    Could not load module libexpat.a(libexpat.so.1).
    System error: No such file or directory
    Could not load module /usr/opt/perl5/lib/site_perl/5.28.1/aix-thread-multi/auto/XML/Parser/Expat/Expat.so.
    Dependent module /usr/opt/perl5/lib/site_perl/5.28.1/aix-thread-multi/auto/XML/Parser/Expat/Expat.so could not be loaded. at /usr/opt/perl5/lib/5.28.1/aix-thread-multi/DynaLoader.pm line 193.
    at /usr/opt/perl5/lib/site_perl/5.28.1/aix-thread-multi/XML/Parser.pm line 18.
    Compilation failed in require at /usr/opt/perl5/lib/site_perl/5.28.1/aix-thread-multi/XML/Parser.pm line 18.
    BEGIN failed--compilation aborted at /usr/opt/perl5/lib/site_perl/5.28.1/aix-thread-multi/XML/Parser.pm line 22.
    Compilation failed in require at -e line 1.
    BEGIN failed--compilation aborted at -e line 1.
    up2f2clua1:root:/tmp>truss -aefdD -o /tmp/truss _perl _<hostname>.out perl -e 'use XML::Parser'
    up2f2clua1:root:/tmp>truss -aefdD -o /tmp/truss _perl _up2f2clua1.out perl -e 'use XML::Parser'
    Can't load '/usr/opt/perl5/lib/site_perl/5.28.1/aix-thread-multi/auto/XML/Parser/Expat/Expat.so' for module XML::Parser::Expat: Could not load module /usr/opt/perl5/lib/site_perl/5.28.1/aix-thread-multi/auto/XML/Parser/Expat/Expat.so.
    Dependent module libexpat.a(libexpat.so.1) could not be loaded.
    Could not load module libexpat.a(libexpat.so.1).
    System error: No such file or directory
    Could not load module /usr/opt/perl5/lib/site_perl/5.28.1/aix-thread-multi/auto/XML/Parser/Expat/Expat.so.
    Dependent module /usr/opt/perl5/lib/site_perl/5.28.1/aix-thread-multi/auto/XML/Parser/Expat/Expat.so could not be loaded. at /usr/opt/perl5/lib/5.28.1/aix-thread-multi/DynaLoader.pm line 193.
    at /usr/opt/perl5/lib/site_perl/5.28.1/aix-thread-multi/XML/Parser.pm line 18.
    Compilation failed in require at /usr/opt/perl5/lib/site_perl/5.28.1/aix-thread-multi/XML/Parser.pm line 18.
    BEGIN failed--compilation aborted at /usr/opt/perl5/lib/site_perl/5.28.1/aix-thread-multi/XML/Parser.pm line 22.
    Compilation failed in require at -e line 1.
    BEGIN failed--compilation aborted at -e line 1.
    -------------------------------------------------------

    The LIBPATH environment variable does not set.  The output of "rpm -qa" and truss when run command is attached.
    Please kindly help to recommend.

    Thanks so much for your help.

    ------------------------------
    Premvadee Kusollerkdee
    ------------------------------

    #AIXOpenSource

    Attachment(s)

    out
    errorserv.out   6 KB 1 version
    out
    okserv.out   2 KB 1 version


  • 2.  RE: AIX 7.1 TL5 perl -e 'use XML::Parser' error Can't load '.../Expat.so'

    Posted Fri March 18, 2022 02:20 PM
    Hi Premvadee,

    This error is because of the latest expat stopped shipping the the library in /usr/lib path.
    As an workaround you may try to run the script as
    LIBPATH=/usr/opt/perl5/lib/5.28.1/aix-thread-multi/CORE:/opt/freeware/lib:/usr/lib perl -e 'use XML::Parser'
    Also, we are trying to avoid perl module dependency on rpm package.
    But this change would be mostly come with latest updated perl version.

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



  • 3.  RE: AIX 7.1 TL5 perl -e 'use XML::Parser' error Can't load '.../Expat.so'

    Posted Sat March 19, 2022 05:31 AM
    Hi Sangamesh,

    I will try as your recommendation. Thanks so much for your help.

    Best Regards,
    Premvadee Kusollerkdee

    ------------------------------
    Premvadee KUSOLLERKDEE
    PremvadeeKUSOLLERKDEE
    ------------------------------