1

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 !

2
  • This module is already packaged by Red Hat, why are you trying to install it via CPAN? Jul 7, 2014 at 11:59
  • I have this problem with all Perl modules. I want to resolve it. Jul 8, 2014 at 9:31

4 Answers 4

1

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

5
  • I assume that you talked about cpanp but it's not working as expected: Jul 7, 2014 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. Jul 7, 2014 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 Jul 7, 2014 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). Jul 7, 2014 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) Jul 8, 2014 at 10:18
1

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

yum install -y "perl(Module::Find)"
5
  • 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. Jul 8, 2014 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, 2014 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 ? Jul 11, 2014 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, 2014 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... Jul 14, 2014 at 9:39
1

Solution exactly for the error:

CPAN::Meta::YAML 0.011 is not available

  1. remove file /usr/local/share/perl5/CPAN/Meta.pm
  2. reinstall it with:

    yum install -y "perl(CPAN::Meta::YAML)"
    

    or via CPAN.

-1

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

This site is temporarily in read-only mode and not accepting new answers.

Not the answer you're looking for? Browse other questions tagged .