in reply to When i am running one of my perl script. It is getting an error like this.

Most likely, you are mixing Perl versions.

The Perl version you are using to run your script is not the version that was used to install/compile the module as stored under /usr/local/lib64/perl5.

You need to use the same Perl version for both, installing/compiling modules and for running your script.

See local::lib and App::perlbrew, and Carmel for maintaining your local Perl installation or alternatively exclusively use the system Perl and the Perl packages provided by your OS vendor.

  • Comment on Re: When i am running one of my perl script. It is getting an error like this.
  • Download Code

Replies are listed 'Best First'.
Re^2: When i am running one of my perl script. It is getting an error like this.
by Anonymous Monk on May 11, 2022 at 07:51 UTC

    But in my system it is showing only one version

    This is perl 5, version 16, subversion 3 (v5.16.3) built for x86_64-li +nux-thread-multi (with 39 registered patches, see perl -V for more detail) Copyright 1987-2012, Larry Wall Perl may be copied only under the terms of either the Artistic License + or the GNU General Public License, which may be found in the Perl 5 source ki +t. Complete documentation for Perl, including FAQ lists, should be found +on this system using "man perl" or "perldoc perl". If you have access to + the Internet, point your browser at http://www.perl.org/, the Perl Home Pa +ge.

      Then how did you install the module XML::CanonicalizeXML? As that module uses libxml2, maybe there is a mismatch between the version of libxml2 that you have installed and the version that the module requires.

      You will have to investigate how you installed the module and its C library prerequisites, and how the test suite of the module runs.

        Is there any way to check the version of libxml2?

        My libxml2 versions are following like this

        /usr/lib/libxml2.so.2 /usr/lib/libxml2.so.2.9.1 /usr/lib64/libxml2.so.2 /usr/lib64/libxml2.so.2.9.1

        The perl version installed in my pc is perl5. so libxml2 also be a version5 or what i have to do

        How can i get the libxml2 to my pc