0

on the server i'm working on perl is installed. I can't change anything on this installation, so i installed cpanm to create my own repository of cpan modules. I defined the install-dir and installed modules there.

The problem is, that some modules are already installed on the server-perl in another version. So i get following error message (this for example, i get this for other modules with other pl-scripts, too)

Digest::MD5 object version 2.39 does not match bootstrap parameter 2.53 at /usr/lib64/perl5/DynaLoader.pm line 223.

in /usr/lib64/perl5 the server-perl modues are installed. Mine are in another directory.

How can i force perl to use my modules if he finds more versions? And is that even the root of the problem?

Thanks!

0

2 Answers 2

1

The order of the paths in @INC matters. Put your directories before the default ones. You can set the environment variable PERL5LIB to point to your directory to achieve that.

3
  • i read about that, but i forgot to mention that as soon as PERL5LIB is set the error occurs. Is there a possibility to set my directory to the head of @INC without setting PER5LIB?
    – Maik
    Mar 5, 2015 at 13:39
  • Wait, DynaLoader? It seems there are two different versions of Perl involved.
    – choroba
    Mar 5, 2015 at 13:50
  • @choroba, No, Digest::MD5 is the module that's in @INC that shouldn't be
    – ikegami
    Mar 5, 2015 at 13:51
0

The version can only be determined by executing (loading) the module, so continuing to look for other versions is problematic.

Modules with a binary component are installed in arch dirs (e.g. .../x86_64-linux-gnu-thread-multi/...). Installing in an external directory using INSTALL_BASE (used by local::lib) also creates architecture-specific libraries. You should not have one Perl installation include the arch dir of another build of Perl. Undo whatever you did to add it. An inappropriate PERL5LIB, maybe?

2
  • I installed local::lib and set the directory to ~/lib/perl/cpan/locallib. I also set the PERL5LIB and thought i have to set it to ~/lib/perl/cpan/locallib/lib/perl5. I f i do so, it automatically adds ~/lib/perl/cpan/locallib/lib/perl5 AND ~/lib/perl/cpan/locallib/lib/perl5/x86_64-linux-thread-multi to @INC. Which is the right value for PERL5LIB? Just the local::lib directory?
    – Maik
    Mar 5, 2015 at 14:13
  • Re "Which is the right value for PERL5LIB?" ~/lib/perl/cpan/locallib if you only used the perl build you are currently using to install modules into that directory. Not ~/lib/perl/cpan/locallib (e.g. empty) otherwise
    – ikegami
    Mar 5, 2015 at 15:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.