RedHat – Can’t install a Perl module (CPAN)

cpanperlredhat

I'm not able to install a perl module:

[root@xxx]# cpan Module::Find
[...]
CPAN: File::Temp loaded ok (v0.22)

CPAN.pm: Going to build C/CR/CRENZ/Module-Find-0.12.tar.gz

Checking if your kit is complete...
Looks good
CPAN::Meta::YAML 0.011 is not available
at /usr/local/share/perl5/CPAN/Meta.pm line 613
Warning: No success on command[/usr/bin/perl Makefile.PL INSTALLDIRS=site]
CRENZ/Module-Find-0.12.tar.gz
/usr/bin/perl Makefile.PL INSTALLDIRS=site -- NOT OK
Running make test
Make had some problems, won't test
Running make install
Make had some problems, won't install

If I try from the console (CPAN):

Checking if your kit is complete...
Looks good
CPAN::Meta::YAML 0.011 is not available
at /usr/local/share/perl5/CPAN/Meta.pm line 613
Warning: No success on command[/usr/bin/perl Makefile.PL INSTALLDIRS=site]
CRENZ/Module-Find-0.12.tar.gz
/usr/bin/perl Makefile.PL INSTALLDIRS=site -- NOT OK
Running make test
Make had some problems, won't test
Running make install
Make had some problems, won't install
Failed during this command:
CRENZ/Module-Find-0.12.tar.gz                : writemakefile NO '/usr/bin/perl     Makefile.PL INSTALLDIRS=site' **returned status 512**

Do you have any idea ?

Thanks !

Best Answer

I think the problem is:

CPAN::Meta::YAML 0.011 is not available
at /usr/local/share/perl5/CPAN/Meta.pm line 613

You could try with cpanm instead of cpan. It will try to resolve those dependency problems for you (mostly with success).