Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

CPAN Error

by narendere (Initiate)
on Jun 11, 2014 at 12:48 UTC ( #1089524=perlquestion: print w/replies, xml ) Need Help??

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

Hi All, I am trying to install perl modules through CPAN. but i am getting below error with cpan command.
Attempt to free unreferenced scalar: SV 0x15b7270, Perl interpreter: 0 +x13f1010 at /usr/lib/perl5/5.8.8/ExtUtils/Liblist.pm line 6. Segmentation fault
same error when we try to install manually. server has rebooted but no luck. Its running on OEL 5.7 below error seen on /var/log/messages
perl[8764]: segfault at 600d00000001 ip 00007fc2affc5395 sp 00007fffc7 +195020 error 4 in libperl.so[7fc2aff2f000+12c000]
any help will be really great.

Replies are listed 'Best First'.
Re: CPAN Error
by marto (Cardinal) on Jun 11, 2014 at 12:53 UTC

    5.8.8 is very old, I'd suggest you seriously consider installing a more modern perl elsewere on your system, messing around with the system perl can result in system wide issues. The installation documentation and perlbrew make this trivial. Which modules are you trying to install which result in this error? Please post more information, and as the page sates:

    " Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!

Re: CPAN Error
by perlfan (Vicar) on Jun 11, 2014 at 13:13 UTC
    There is not a lot of info here to go by, but as far as I know old perls don't give errors like that (at least not 5.8.8). Something is mismatched or corrupted. Can you rebuild perl on that machine?
Re: CPAN Error
by Anonymous Monk on Oct 23, 2014 at 14:05 UTC

    I ran into same issue, it seems that in order to use some packages that are not pure perl, you need to rebuild them in order to use them with new perl version. Yum normally rebuilds them, but if you installed them manually, the yum can not detect them and keep the old version. I resolved the issue this way :

    mv /usr/lib/perl5 /usr/lib/perl5-backup mv /usr/lib64/perl5 /usr/lib64/perl5-backup yum reinstall perl
      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 scritps 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 differen +t 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 The fix: Download PathTools-3.47 from CPAN http://search.cpan.org/~smueller/PathTools-3.47/ edit MakeFile.PL In Makefile.PL in PathTools-3.47 Before the following line add “use File::Spec” (It must be before the +line "use ExtUtils::MakeMaker;" ) Like so: 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 Aafter 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.
        We had the same problem after a perl update from redhat. You solution worked fine. Thanx
        Thanks man!!! You saved my day!
        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.

        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?

      Hi, we had the same issue solved by reinstalling perl and all the modules with yum. Thanks!
      This one worked for me. Thanks for the easy fix.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (5)
As of 2021-09-19 14:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?