Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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 !

share|improve this question
    
This module is already packaged by Red Hat, why are you trying to install it via CPAN? –  Michael Hampton Jul 7 at 11:59
    
I have this problem with all Perl modules. I want to resolve it. –  Bob Sauvage Jul 8 at 9:31

3 Answers 3

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).

share|improve this answer
    
I assume that you talked about cpanp but it's not working as expected: –  Bob Sauvage Jul 7 at 9:35
    
[ERROR] Could not read /root/.cpanplus/5.10.1/build/CPAN-Meta-YAML-0.012/META.yml: 'Can't locate CPAN/Meta/YAML.pm in @INC (@INC contains: /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 /usr/local/share/perl5/Parse/CPAN/Meta.pm line 119. –  Bob Sauvage Jul 7 at 9:36
    
Looks good CPAN::Meta::YAML 0.011 is not available at /usr/local/share/perl5/CPAN/Meta.pm line 613 [ERROR] Could not run '/usr/bin/perl Makefile.PL': 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 -- cannot continue [ERROR] Unable to create a new distribution object for 'CPAN::Meta::YAML' -- cannot continue –  Bob Sauvage Jul 7 at 9:37
    
no, cpanm: search.cpan.org/dist/App-cpanminus/bin/cpanm; the error you are getting is still the same, you need YAML.pm version 0.011 (in centos 6 the available perl-YAML is 0.70, I do not know if that would work for you with yum install perl-YAML in the RHEL host you are using). –  natxo asenjo Jul 7 at 9:39
    
The problem is with the makefile: perl Makefile.PL 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 (Even if I try to build YAML 0.011) –  Bob Sauvage Jul 8 at 10:18

The best way would be to install this package from the package repositories, not via CPAN:

yum install -y "perl(Module::Find)"
share|improve this answer
    
Thanks but on RedHat 6.5: No package perl(Module::Find) available. I have this error with all Perl modules, I wish to resolve it. –  Bob Sauvage Jul 8 at 9:40
    
Well, the package IS in the base repository. If you can't install them as per the above, this means your repository is not properly configured. Please fix this, it's important, because this is how you receive security updates! –  MichielB Jul 8 at 13:53
    
Thanks for the information but it is not in the base repository but in the repo "rhel-6-server-optional-rpms". Thanks to you, I have updated my repos list. Is it a good idea to use "rhel-6-server-optional-rpms" and "rhel-6-server-supplementary" repos ? –  Bob Sauvage Jul 11 at 12:22
    
For sure! They're curated by Red Hat and it would be much easier to get support for your install would you need it if you'd use these packages. On the same note, I prefer installing from EPEL (Extra Packages for Enterprise Linux) over using CPAN because it allows you to get reproducable results on different installs, whereas installing from just CPAN typically installs the last available version. –  MichielB Jul 14 at 6:44
    
Thanks a lot, EPEL was also one of my multiple questions ! I had a doubt on the quality of this kind of repos for a production use... –  Bob Sauvage Jul 14 at 9:39

The problem has been solved by deleting the file /usr/local/share/perl5/CPAN/Meta.pm.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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