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 !

Flup
  • 7,978
  • 2
  • 32
  • 43
Bob Sauvage
  • 21
  • 1
  • 1
  • 6

4 Answers4

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

natxo asenjo
  • 5,739
  • 2
  • 26
  • 27
  • I assume that you talked about cpanp but it's not working as expected: – Bob Sauvage Jul 07 '14 at 09: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 07 '14 at 09: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 07 '14 at 09:37
  • no, cpanm: http://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 07 '14 at 09: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 08 '14 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)"
MichielB
  • 591
  • 2
  • 6
  • 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 08 '14 at 09: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 08 '14 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 '14 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 '14 at 06: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 '14 at 09: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.

techraf
  • 4,243
  • 8
  • 29
  • 44
-1

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

Bob Sauvage
  • 21
  • 1
  • 1
  • 6