Several perl packages (including cpan and re.pl) not working after upgrade from 12.04 to 14.04

5,664

As said in my comments above, there's a conflict between 5.14 and 5.18.

The proposed solution was renaming ~/perl5 to ~/perl5_old so that both cpan and re.pl works again.

To answer your last question, I would manage ~/perl5 to run 5.18 using perlbrew.

See How can I install a newer Perl without damaging the system install?

Share:
5,664

Related videos on Youtube

DJG
Author by

DJG

Updated on September 18, 2022

Comments

  • DJG
    DJG over 1 year

    Several perl packages stopped working after upgrade from 12.04 to 14.04.

    For example, cpan gives me:

    Attempt to reload Scalar/Util.pm aborted.
    Compilation failed in require at /usr/local/share/perl/5.18.2/CPAN/Meta/Requirements.pm line 35.
    BEGIN failed--compilation aborted at /usr/local/share/perl/5.18.2/CPAN/Meta/Requirements.pm line 35.
    Compilation failed in require at /usr/share/perl/5.18/CPAN/Distribution.pm line 7.
    BEGIN failed--compilation aborted at /usr/share/perl/5.18/CPAN/Distribution.pm line 7.
    Compilation failed in require at /usr/share/perl/5.18/CPAN.pm line 25.
    BEGIN failed--compilation aborted at /usr/share/perl/5.18/CPAN.pm line 25.
    Compilation failed in require at /usr/share/perl/5.18/App/Cpan.pm line 219.
    BEGIN failed--compilation aborted at /usr/share/perl/5.18/App/Cpan.pm line 219.
    Compilation failed in require at /usr/local/bin/cpan line 9.
    BEGIN failed--compilation aborted at /usr/local/bin/cpan line 9.
    

    and re.pl gives me:

    Perl API version v5.14.0 of List::Util does not match v5.18.0 at /usr/share/perl/5.18/XSLoader.pm line 92.
    Compilation failed in require at /home/abc/perl5/lib/perl5/x86_64-linux-gnu-thread-multi/Scalar/Util.pm line 11.
    Compilation failed in require at /usr/local/lib/perl/5.18.2/Moose.pm line 9.
    BEGIN failed--compilation aborted at /usr/local/lib/perl/5.18.2/Moose.pm line 9.
    Compilation failed in require at /usr/local/share/perl/5.18.2/Devel/REPL/Script.pm line 6.
    BEGIN failed--compilation aborted at /usr/local/share/perl/5.18.2/Devel/REPL/Script.pm line 6.
    Compilation failed in require at /usr/local/bin/re.pl line 6.
    BEGIN failed--compilation aborted at /usr/local/bin/re.pl line 6.
    

    Is there anyone to simply get a fresh install of perl and all of its packages?

    • Sylvain Pineau
      Sylvain Pineau over 9 years
      there's a conflict between 5.14 and 5.18. I suspect that you have a local version of perl. Could you attach to your question the output of type perl? I think you probably just need to update your perl lib in /usr/local/. You probably also have a PERLLIB that includes incompatible modules from /home/abc/perl5/lib
    • Sylvain Pineau
      Sylvain Pineau over 9 years
      Are you able to use Scalar::Util if you rename /home/abc/perl5 to /home/abc/perl5_old?
    • DJG
      DJG over 9 years
      @SylvainPineau type perl returns perl is /usr/bin/perl. Renaming ~/perl5 to ~/perl5_old successfully allowed me to use Scalar::Util and run both cpan and re.pl! Should I go ahead and start installing cpan packages again, or is there something else that needs to be fixed so that the local ~/perl5 does what it's supposed to?