Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re^2: CPAN Error

by mds (Novice)
on Jan 06, 2015 at 21:09 UTC ( [id://1112413]=note: print w/replies, xml ) Need Help??


in reply to Re: CPAN Error
in thread CPAN Error

How I solved this problem, YMMV.
Updated perl perl-5.8.8-42.el5 to perl-5.8.8-43.el5

Got the following error when I tried to run cpan :

Attempt to free unreferenced scalar: SV 0x87bf8e4, Perl interpreter: 0 +x869f008 at /usr/lib/perl5/5.8.8/ExtUtils/Liblist.pm line 6. Segmentation fault
Other scripts produced this error:
Attempt to free unreferenced scalar: SV 0xe07c990, Perl interpreter: 0 +xe055010 at /usr/lib/perl5/5.8.8/FindBin.pm line 101. Segmentation fault
Downgraded perl to perl-5.8.8-42.el5 and still got the same problem

The problem is that we installed something via CPAN that is a different version then what redhat perl uses.
I duplicated this problem by creating a CentOS image ( CentOS release 5.11 (Final) )
This installed perl-5.8.8-42.el5. I updated everything except perl.
I then installed cpan bundle ( cpan> install Bundle::CPAN )
At this point everything still works.
yum update -> installed the perl-5.8.8-43.el5
This broke cpan and other modules.

It looks like this is the main culprit:
Cwd was downgraded when perl was upgraded.

Module id = Cwd CPAN_USERID SMUELLER (Steffen Mueller smueller@cpan.org) CPAN_VERSION 3.47 CPAN_FILE S/SM/SMUELLER/PathTools-3.47.tar.gz MANPAGE Cwd - get pathname of current working directory INST_FILE /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/Cwd.pm INST_VERSION 3.12 <code> The fix: <br>Download PathTools-3.47 from CPAN <br>[http://search.cpan.org/~smueller/PathTools-3.47/] <p> edit MakeFile.PL <br>In Makefile.PL in PathTools-3.47 <br>Before the following line add “use File::Spec” (It must be before +the line "use ExtUtils::MakeMaker;" ) <br>Like so: <code> use File::Spec; use ExtUtils::MakeMaker; # make # make test PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_h +arness(0, 'blib/lib', 'blib/arch')" t/*.t t/crossplatform.........ok 1/71Can't use an undefined value as an ARRA +Y reference at /usr/lib/perl5/5.8.8/Test/Harness.pm line 373. make: *** [test_dynamic] Error 255
I went ahead and ran make install anyways.
# make install

This fixed the cpan problem with the "unreferenced scalar".
From there I ran "install Test::Harness" which resulted in this error:

Can't call method "reftype" on unblessed reference at /usr/lib64/perl5 +/5.8.8/x86_64-linux-thread-multi/Safe.pm line 370.
According to this reference the fix was to change reftype to ref.
http://www.schnallich.net/index.php/Cpan

I changed the line on 370 in Safe.pm to

my $reftype = $item && ref $item
Downloaded Scalar-List-Utils-1.41
Installed it even though Test::Harness failed as above

This allowed me to do a cpan> install Test::Harness

After that I also updated the following through CPAN:
Test::Simple
ExtUtils::MakeMaker

This seemed to fix all the problems I was seeing.
The real solution is to get off of redhat 5 and go to 6 or 7.
Then roll my own perl and never touch the system installed perl except through yum updates as previously stated by marto.

Replies are listed 'Best First'.
Re^3: CPAN Error
by Anonymous Monk on Jan 26, 2015 at 10:23 UTC
    We had the same problem after a perl update from redhat. You solution worked fine. Thanx
Re^3: CPAN Error
by Anonymous Monk on Jul 15, 2015 at 01:18 UTC
    Thanks man!!! You saved my day!
Re^3: CPAN Error
by Anonymous Monk on Apr 05, 2016 at 01:39 UTC
    Thank you for this! I got slightly different results for the Makefile step, but also installed it anyway. Install Test::Harness didn't complain at all, nor did install Test::Simple and ExtUtils::MakeMaker. I'd seen other reference to the 'upgrade' hosing things. Your info was the only real *solution* I've seen.
Re^3: CPAN Error
by Anonymous Monk on Nov 29, 2016 at 05:33 UTC

    i have the same issue but when i try to

    #make

    i got the error:

    [root@SV-MONITORING-VIP PathTools-3.47]# make make: *** No targets specified and no makefile found. Stop. [root@SV-MONITORING-VIP PathTools-3.47]#

    How can i fix this?

      run perl Makefile.PL the first step , that creates a Makefile, which make can read when you run make as a second step

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (6)
As of 2024-04-18 05:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found