3

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?

DJG
  • 99

1 Answers1

5

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?