Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

cpan try to install a module for a higher perl revision

by earlati (Acolyte)
on Dec 16, 2009 at 14:32 UTC ( [id://813020]=perlquestion: print w/replies, xml ) Need Help??

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

I'm trying to install the module YAML using cpan. I have perl rev.5.06 ( on redhat 7.3 ), but cpan try to install YAML 0.70 which require perl 5.8

Belowe is the log of the installation

cpan[2]> install YAML CPAN: Storable loaded ok (v2.20) Going to read '/root/.cpan/Metadata' Database was generated on Tue, 15 Dec 2009 22:06:58 GMT Running install for module 'YAML' Running make for A/AD/ADAMK/YAML-0.70.tar.gz CPAN: Digest::SHA loaded ok (v5.47) CPAN: Compress::Zlib loaded ok (v2.023) Checksum for /root/.cpan/sources/authors/id/A/AD/ADAMK/YAML-0.70.tar.g +z ok Scanning cache /root/.cpan/build for sizes ...................................................................... +------DONE DEL(1/1): /root/.cpan/build/ExtUtils-CBuilder-0.27-7zCEl4 CPAN: Archive::Tar loaded ok (v1.52) YAML-0.70/ YAML-0.70/Makefile.PL YAML-0.70/META.yml YAML-0.70/LICENSE YAML-0.70/README ............. YAML-0.70/lib/YAML/Loader.pm YAML-0.70/lib/Test/ YAML-0.70/lib/Test/YAML.pm CPAN: File::Temp loaded ok (v0.22) CPAN.pm: Going to build A/AD/ADAMK/YAML-0.70.tar.gz ERROR: perl: Version 5.006001 is installed, but we need version >= 5.0 +08 at inc/Module/Install/Makefile.pm line 119. Warning: No success on command[/usr/bin/perl Makefile.PL] Warning (usually harmless): 'YAML' not installed, will not store persi +stent state ADAMK/YAML-0.70.tar.gz /usr/bin/perl Makefile.PL -- NOT OK Running make test Make had some problems, won't test Running make install Make had some problems, won't install Could not read '/root/.cpan/build/YAML-0.70-nFnsag/META.yml'. Falling +back to other methods to determine prerequisites Failed during this command: ADAMK/YAML-0.70.tar.gz : writemakefile NO '/usr +/bin/perl Makefile.PL' returned status 7424

What I have to do to tell cpan to installa a revision of YAML suitable to my perl revision =

My revison of cpan is : /usr/bin/cpan script version 1.9, CPAN.pm version 1.9402

and the my perl configuration is:

[enzo@P0101222 enzo]$ perl -V Summary of my perl5 (revision 5.0 version 6 subversion 1) configuratio +n: Platform: osname=linux, osvers=2.4.21-1.1931.2.393.entsmp, archname=i386-lin +ux uname='linux bugs.devel.redhat.com 2.4.21-1.1931.2.393.entsmp #1 s +mp thu aug 14 14:47:21 edt 2003 i686 unknown ' config_args='-des -Doptimize=-O2 -march=i386 -mcpu=i686 -Dcc=gcc - +Dcf_by=Red Hat, Inc. -Dcccdlflags=-fPIC -Dinstallprefix=/usr -Dprefix +=/usr -Darchname=i386-linux -Dvendorprefix=/usr -Dsiteprefix=/usr -Uu +sethreads -Uuseithreads -Uuselargefiles -Dd_dosuid -Dd_semctl_semun - +Di_db -Di_ndbm -Di_gdbm -Di_shadow -Di_syslog -Dman3ext=3pm -Dinc_ver +sion_list=5.6.0/i386-linux 5.6.0' hint=recommended, useposix=true, d_sigaction=define usethreads=undef use5005threads=undef useithreads=undef usemultipl +icity=undef useperlio=undef d_sfio=undef uselargefiles=undef usesocks=undef use64bitint=undef use64bitall=undef uselongdouble=undef Compiler: cc='gcc', ccflags ='-fno-strict-aliasing -I/usr/local/include', optimize='-O2 -march=i386 -mcpu=i686', cppflags='-fno-strict-aliasing -I/usr/local/include' ccversion='', gccversion='2.96 20000731 (Red Hat Linux 7.3 2.96-11 +3)', gccosandvers='' intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=1 +2 ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', + lseeksize=4 alignbytes=4, usemymalloc=n, prototype=define Linker and Libraries: ld='gcc', ldflags =' -L/usr/local/lib' libpth=/usr/local/lib /lib /usr/lib libs=-lnsl -ldl -lm -lc -lcrypt -lutil perllibs=-lnsl -ldl -lm -lc -lcrypt -lutil libc=/lib/libc-2.2.5.so, so=so, useshrplib=false, libperl=libperl. +a Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynami +c' cccdlflags='-fPIC', lddlflags='-shared -L/usr/local/lib' Characteristics of this binary (from libperl): Compile-time options: Built under linux Compiled at Aug 18 2003 16:08:31 @INC: /usr/lib/perl5/5.6.1/i386-linux /usr/lib/perl5/5.6.1 /usr/lib/perl5/site_perl/5.6.1/i386-linux /usr/lib/perl5/site_perl/5.6.1 /usr/lib/perl5/site_perl/5.6.0 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.6.1/i386-linux /usr/lib/perl5/vendor_perl/5.6.1 /usr/lib/perl5/vendor_perl .
Thanks for the hoped help. Enzo

Replies are listed 'Best First'.
Re: cpan try to install a module for a higher perl revision
by marto (Cardinal) on Dec 16, 2009 at 14:49 UTC

    See the following note from Changes:

    "Bumping dependency to 5.8.0 but I think it's only in the test suite. However, I can't prove it. So if anyone wants 5.6 compatibility back you need to fix or rewrite the test suite."

    Martin

Re: cpan try to install a module for a higher perl revision
by keszler (Priest) on Dec 16, 2009 at 14:47 UTC
    What I have to do to tell cpan to install a revision of YAML suitable to my perl revision? [(revision 5.0 version 6 subversion 1)]
    You cannot. The current YAML requires Perl 5.8.0 at minimum.

    http://cpansearch.perl.org/src/ADAMK/YAML-0.70/META.yml contains:

    requires: Filter::Util::Call: 0 perl: 5.8.0
    2nd thought:Install an older version of YAML, one from before the Perl 5.8.0 dependency. Download the gzipped tarball, then:
    cpan> install YAML-0.35.tar.gz
      cpan seems to have a problem in searching the right module, because it often try to upgrade modules that is not suitable for perl 5.6.

      There are non way to configure cpan in order to limit it's search only to module revision suitable to my perl revision ?

        There are non way to configure cpan in order to limit it's search only to module revision suitable to my perl revision ?

        No, unfortunately there is not. I'm sure patches are welcome :0)

        The first thing I would try would be to download the package, modify the part of the dist that forces this requirement, and see if the tests still pass. If they do, I'd say you are safe to use it.

        Next would be as others have suggested, to find a version of the dist that does install successfully with your version of perl.

        If you can't get a version of the module working with your perl and you really need this module, you'll have to build a newer perl. See Re: 2nd Perl installation on Mac OSX

        But matter what, you're going to have to learn how the module system works if you need this module. You're using a really old operating system, so you're not going to get much support. But rest assured there are still relatively simple ways to get it to do what you need.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://813020]
Approved by planetscape
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (3)
As of 2024-04-26 07:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found