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

I tried to install a Perl module, DBI-1.609 on centOS 6.6 or 7 and I am getting the same error:

 Can't locate ExtUtils/MakeMaker.pm in @INC (@INC contains: lib /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl

 /usr/lib64/perl5 /usr/share/perl5 .) at Makefile.PL line 14.

 BEGIN failed--compilation aborted at Makefile.PL line 14.

Please help me to figure it out what the problem is. Thank you

Replies are listed 'Best First'.
Re: Error Perl module installation Linux
by tobyink (Canon) on Jul 25, 2018 at 00:16 UTC

    If you're installing the module on your system version of Perl (i.e. the one which was pre-installed as part of your OS) then you're probably best off installing modules using your system's package manager (which would be yum on CentOS).

    Something like:

    $ sudo yum install perl-DBI perl-DBD-SQLite
Re: Error Perl module installation Linux
by marto (Cardinal) on Jul 25, 2018 at 08:44 UTC

    Your post history is a little bit all over the place. Last time you were trying to build a perl of your own to avoid using the system perl. If you've done this successfully you'll need to use cpan which ships with your perl, rather than the system perl. which cpan likely shows the system perl. Examine the previous replies you got about the PATH environment variable. If you are using the system perl now, use your OS package manager as suggested.

Re: Error Perl module installation Linux
by zentara (Cardinal) on Jul 25, 2018 at 09:23 UTC
    First thing to do is in a terminal type "which -a perl", without the quotes. That will tell you which perl is being found first in a search of your $PATH. If you installed your own perl, it is likely that /usr/local/bin/perl will be the first answer.

    If you installed your own perl, you must now start using cpan to install modules. Try this as root: "cpan install DBI" and see what happens. It should install all dependencies needed by DBI first. Watch the terminal and see what transpires as cpan works.... it is quite amazing.


    I'm not really a human, but I play one on earth. ..... an animated JAPH