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

Hi Monks, I have run into an issue I hope you can help with. I am moving some perl scripts from a RHEL 5.X system running Perl 5.8 to RHEL 6.X systems running Perl 5.10.1. I was able to install the package perl-DBI on the new Systems, however even though this is Perl 5.10.1 its still looking for DynaLoader.pm when it is run. I thought DynaLoader is part of the Base Perl5.10 installation, so I am unsure why it is still asking for it. Any insight into what I am doing wrong is appreciated! When I execute my script I get this error:
Can't locate DynaLoader.pm in @INC (@INC contains: /usr/lib64/perl5/5. +10.0 /usr/lib64/perl5 /usr/local/lib64/perl5/ /usr/local/share/perl / +usr/lib64/perl5/vendor_perl /usr/share/perl5 /opt/SecureTransport/lib + /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/share/perl5/vendo +r_perl .) at /usr/lib64/perl5/DBI.pm line 157. BEGIN failed--compilation aborted at /usr/lib64/perl5/DBI.pm line 157.
Thanks in advance for your help!

Replies are listed 'Best First'.
Re: Issue using DBI on Perl 5.10.1
by hippo (Archbishop) on Oct 20, 2015 at 21:31 UTC

    On my CentOS 6 box, DynaLoader.pm is found at /usr/lib64/perl5/DynaLoader.pm and since /usr/lib64/perl5 is reported to be in your @INC, you should be finding it. This file is part of the "perl" rpm, so if you have perl installed (via yum) but DynaLoader.pm is missing then it's likely that something has gone badly wrong with your system.

Re: Issue using DBI on Perl 5.10.1
by pvaldes (Chaplain) on Oct 20, 2015 at 20:57 UTC

    Have you tried to install DynaLoader from CPAN, and run again your program?

    bash-prompt$  cpan install DynaLoader

    Note that both D and L in the name are in uppercase. The name Dynaloader will fail

      that won't work, either you have DynaLoader/XSLoader, or you don't, either your perl supports dynamic loading or its a static perl (no dynamic loading)

      if dynaloader is missing @INC got corrupted

      or you need to recompile perl