soubalaji has asked for the wisdom of the Perl Monks concerning the following question:

Hi, Currently iam using unix for running perl. While running the perl in running it's showing can't load .. module and showing that in another path. (i.e)

Error below:

bash-2.05b$ /u/unilocal/perl-5.8.0/bin/perl xxx.plx configfiles/psd/xxxx.xml

Can't load '/u/unilocal/perl-5.8.0-site/lib/aix/auto/XML/Parser/Expat/Expat.so' for module XML::Parser::Expat: 0509-022 Cannot load module /u/unilocal/perl-5.8.0-site/lib/aix/auto/XML/Parser/Expat/Expat.so.

Iam running perl in perl-5.8.0 but the error is showing in perl-5.8.0-site.

Kindly let me know how to solve this.

Replies are listed 'Best First'.
Re: Version conflict
by Anonyrnous Monk (Hermit) on Dec 30, 2010 at 13:29 UTC

    Looks like the module (XML::Parser) has been installed in the 5.8.0-site tree, and that directory is in @INC — which is not a problem in and of itself. Rather, the problem likely is that the dependent libexpat (C) library cannot be loaded, for example because it simply isn't installed.  So that would be the first thing to check.

    P.S. anything else after the

    ...0509-022 Cannot load module /u/unilocal/perl-5.8.0-site/lib/aix/aut +o/XML/Parser/Expat/Expat.so ?...?

    that would hint at why it cannot be loaded?  Often, you'll find the underlying system error there, e.g. "No such file or directory", "Permission denied", or some such.

      The error is below:

      Can't load '/u/unilocal/perl-5.8.0-site/lib/aix/auto/XML/Parser/Expat/Expat.so' for module XML::Parser::Expat: 0509-022 Cannot load module /u/unilocal/perl-5.8.0-site/lib/aix/auto/XML/Parser/Expat/Expat.so.
      0509-150 Dependent module /usr/lib/libexpat.a(libexpat.so.0) could not be loaded.
      0509-152 Member libexpat.so.0 is not found in archive
      0509-022 Cannot load module /u/unilocal/perl-5.8.0-site/lib/aix/auto/XML/Parser/Expat/Expat.so.
      0509-150 Dependent module /u/unilocal/perl-5.8.0-site/lib/aix/auto/XML/Parser/Expat/Expat.so could not be loaded. at /u/unilocal/perl-5.8.0/lib/aix/DynaLoader.pm line 229.
      at /u/unilocal/perl-5.8.0-site/lib/aix/XML/Parser.pm line 15
      Compilation failed in require at /u/unilocal/perl-5.8.0-site/lib/aix/XML/Parser.pm line 15.
      BEGIN failed--compilation aborted at /u/unilocal/perl-5.8.0-site/lib/aix/XML/Parser.pm line 19.
      Compilation failed in require at cemas.plx line 37.
      BEGIN failed--compilation aborted at cemas.plx line 37.

        The relevant part is

        0509-150 Dependent module /usr/lib/libexpat.a(libexpat.so.0) could not + be loaded.

        Consult with your system administrator how to install Expat and its libraries, or where these libraries live.